29 lines
769 B
Diff
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
|