From 3b6642fd7bc2abf4fba3c10f83930aa55a56a2621c5e8daa3360cf079055ef95 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 17 Apr 2014 08:51:02 +0000 Subject: [PATCH] - setup-check-for-rpmbuild.patch: setup: Check for rpmbuild availability (bnc#873817) - Add recommends: rpmbuild (bnc#873817) OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/quilt?expand=0&rev=77 --- quilt.changes | 7 +++++++ quilt.spec | 3 +++ setup-check-for-rpmbuild.patch | 28 ++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 setup-check-for-rpmbuild.patch diff --git a/quilt.changes b/quilt.changes index cb0663c..b568bf5 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Apr 17 10:49:29 CEST 2014 - jdelvare@suse.de + +- setup-check-for-rpmbuild.patch: setup: Check for rpmbuild + availability (bnc#873817) +- Add recommends: rpmbuild (bnc#873817) + ------------------------------------------------------------------- Fri Mar 21 09:42:03 CET 2014 - ohering@suse.de diff --git a/quilt.spec b/quilt.spec index c3cb0b5..300c431 100644 --- a/quilt.spec +++ b/quilt.spec @@ -42,11 +42,13 @@ Source1: suse-start-quilt-mode.el Patch1: expand.diff Patch2: quilt-support-vimdiff.patch Patch3: patch-wrapper-rpm.diff +Patch4: setup-check-for-rpmbuild.patch Patch5: suse-workaround-pseudo-release.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch Recommends: procmail Recommends: bzip2 +Recommends: /usr/bin/rpmbuild %if 0%{?suse_version} > 1120 Recommends: xz %endif @@ -64,6 +66,7 @@ http://www.zip.com.au/~akpm/linux/patches/. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %patch5 -p1 %build diff --git a/setup-check-for-rpmbuild.patch b/setup-check-for-rpmbuild.patch new file mode 100644 index 0000000..de67b48 --- /dev/null +++ b/setup-check-for-rpmbuild.patch @@ -0,0 +1,28 @@ +From: Jean Delvare +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