[linux] 03/03: debian/rules.real: Avoid error message when usbip's config.h doesn't exist

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Sun Aug 28 14:56:07 UTC 2016


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository linux.

commit d66fc073423b01f578b3ffdd8acb4c74b139321d
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Sun Aug 28 15:42:31 2016 +0100

    debian/rules.real: Avoid error message when usbip's config.h doesn't exist
    
    usbip has its own version number which we combine with the source
    package version, which is assigned to VERSION for the install-usbip
    target (only).  We find the version number by processing the config.h
    file created by autoconf.  The file always exists before the
    install-usbip rule is invoked, but the target-specific definition of
    VERSION is still evaluated whenever debian/rules.real is used,
    resulting in confusing (though harmless) error messages about a
    missing file.
    
    We could change VERSION to be a recursively-expanded variable, but
    then it would still be evaulated multiple times.  Instead, move the
    definition of VERSION into the target's commands.
---
 debian/changelog  | 1 +
 debian/rules.real | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 255f538..083176e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -46,6 +46,7 @@ linux (4.7.2-1) UNRELEASED; urgency=medium
   * aacraid: Check size values after double-fetch from user (CVE-2016-6480)
   * liblockdep: Move dummy definition of prandom_u32() to fix missing
     declaration
+  * debian/rules.real: Avoid error message when usbip's config.h doesn't exist
 
   [ Martin Michlmayr ]
   * [armhf] Enable MMC_SDHCI_IPROC and HW_RANDOM_BCM2835 for BCM2835.
diff --git a/debian/rules.real b/debian/rules.real
index 2175cb4..895d52b 100644
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -580,7 +580,6 @@ endif
 
 install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip
 install-usbip: DIR = $(CURDIR)/debian/usbip-tmp
-install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/build-tools/tools/usb/usbip/config.h)
 install-usbip: $(STAMPS_DIR)/build-tools
 	dh_testdir
 	dh_testroot
@@ -598,8 +597,9 @@ endif
 	dh_fixperms
 	dh_installdeb
 	dh_shlibdeps
-	test -n "$(VERSION)" -a -n "$(DEB_VERSION)"
-	dh_gencontrol -- -v$(VERSION)+$(DEB_VERSION)
+	VERSION=$$(sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/build-tools/tools/usb/usbip/config.h) && \
+	test -n "$$VERSION" -a -n "$(DEB_VERSION)" && \
+	dh_gencontrol -- -v$$VERSION+$(DEB_VERSION)
 	dh_md5sums
 	dh_builddeb
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list