SHA256
1
0
forked from pool/quilt
quilt/setup-check-for-rpmbuild.patch
2014-04-17 08:51:02 +00:00

29 lines
769 B
Diff

From: Jean Delvare <jdelvare@suse.de>
Subject: setup: Check for rpmbuild availability
References: bnc#873817
Upstream: Not yet submitted
Before running inspect on a spec file, verify that rpmbuild is
available. Print a user-friendly error message if not.
---
quilt/setup.in | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -167,6 +167,14 @@ case "$1" in
*.spec)
spec_file=$1
+ # check if rpmbuild is installed before running inspect
+ if ! type rpmbuild &> /dev/null
+ then
+ echo $"You have to install '%s' (from package %s) to use 'quilt %s'\n" \
+ rpmbuild rpm-build setup >&2
+ exit 1
+ fi
+
if ! $QUILT_DIR/scripts/inspect $verbose $opt_sourcedir $opt_fuzz \
"$spec_file" 2>&1 > $tmpfile
then