This is an automated email from the git hooks/post-receive script. jamessan pushed a commit to branch master in repository devscripts.
commit aa50e056b8c1c8532eb7080fe90b0a7adbcb91b2 Author: James McCoy <[email protected]> Date: Mon Dec 1 23:26:22 2014 -0500 Call dpkg-architecture with any and all -a/-t switches In 2.14.9/2.14.10, scripts were changed to pass on the -a/-t switches only when both were present to fix a bug with not specifying a value for those switches. However, that broke cases where only one of the switches was provided. This commit handles all scenarios (-a & -t specified, -a specified, -t specified, none specified) which is inline with the original behavior. Closes: #768587 Signed-off-by: James McCoy <[email protected]> --- debian/changelog | 2 ++ scripts/cvs-debi.sh | 4 ++++ scripts/cvs-debrelease.sh | 4 ++++ scripts/debrelease.sh | 5 ++++- scripts/debrsign.sh | 4 ++++ scripts/debsign.sh | 4 ++++ scripts/debuild.pl | 7 +++++-- 7 files changed, 27 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 069cc55..37baa1f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ devscripts (2.14.11) UNRELEASED; urgency=medium #766641) * annotate-output: Fix handling of a date format that contains whitespace. (Closes: #766180) + * Fix regression in dpkg-architecture using scripts when only -a or -t is + specified, rather than both or neither. (Closes: #768587) [ Jakub Wilk ] * sadt: diff --git a/scripts/cvs-debi.sh b/scripts/cvs-debi.sh index 023a970..ec8daa5 100755 --- a/scripts/cvs-debi.sh +++ b/scripts/cvs-debi.sh @@ -342,6 +342,10 @@ fi if [ -n "$targetarch" ] && [ -n "$targetgnusystem" ]; then setq arch "$(dpkg-architecture "-a${targetarch}" "-t${targetgnusystem}" -qDEB_HOST_ARCH)" "build architecture" +elif [ -n "$targetarch" ]; then + setq arch "$(dpkg-architecture "-a${targetarch}" -qDEB_HOST_ARCH)" "build architecture" +elif [ -n "$targetgnusystem" ]; then + setq arch "$(dpkg-architecture "-t${targetgnusystem}" -qDEB_HOST_ARCH)" "build architecture" else setq arch "$(dpkg-architecture -qDEB_HOST_ARCH)" "build architecture" fi diff --git a/scripts/cvs-debrelease.sh b/scripts/cvs-debrelease.sh index 9bbdd17..46aaf2e 100755 --- a/scripts/cvs-debrelease.sh +++ b/scripts/cvs-debrelease.sh @@ -355,6 +355,10 @@ fi if [ -n "$targetarch" ] && [ -n "$targetgnusystem" ]; then setq arch "$(dpkg-architecture "-a${targetarch}" "-t${targetgnusystem}" -qDEB_HOST_ARCH)" "build architecture" +elif [ -n "$targetarch" ]; then + setq arch "$(dpkg-architecture "-a${targetarch}" -qDEB_HOST_ARCH)" "build architecture" +elif [ -n "$targetgnusystem" ]; then + setq arch "$(dpkg-architecture "-t${targetgnusystem}" -qDEB_HOST_ARCH)" "build architecture" else setq arch "$(dpkg-architecture -qDEB_HOST_ARCH)" "build architecture" fi diff --git a/scripts/debrelease.sh b/scripts/debrelease.sh index 75ea9af..c25418e 100755 --- a/scripts/debrelease.sh +++ b/scripts/debrelease.sh @@ -284,11 +284,14 @@ EOF fi fi - if [ "x$sourceonly" = "xsource" ]; then arch=source elif [ -n "$targetarch" ] && [ -n "$targetgnusystem" ]; then mustsetvar arch "$(dpkg-architecture "-a${targetarch}" "-t${targetgnusystem}" -qDEB_HOST_ARCH)" "build architecture" +elif [ -n "$targetarch" ]; then + mustsetvar arch "$(dpkg-architecture "-a${targetarch}" -qDEB_HOST_ARCH)" "build architecture" +elif [ -n "$targetgnusystem" ]; then + mustsetvar arch "$(dpkg-architecture "-t${targetgnusystem}" -qDEB_HOST_ARCH)" "build architecture" else mustsetvar arch "$(dpkg-architecture -qDEB_HOST_ARCH)" "build architecture" fi diff --git a/scripts/debrsign.sh b/scripts/debrsign.sh index aaf5a78..f21536c 100755 --- a/scripts/debrsign.sh +++ b/scripts/debrsign.sh @@ -164,6 +164,10 @@ case $# in then if [ -n "$targetarch" ] && [ -n "$targetgnusystem" ]; then mustsetvar arch "$(dpkg-architecture "-a${targetarch}" "-t${targetgnusystem}" -qDEB_HOST_ARCH)" "build architecture" + elif [ -n "$targetarch" ]; then + mustsetvar arch "$(dpkg-architecture "-a${targetarch}" -qDEB_HOST_ARCH)" "build architecture" + elif [ -n "$targetgnusystem" ]; then + mustsetvar arch "$(dpkg-architecture "-t${targetgnusystem}" -qDEB_HOST_ARCH)" "build architecture" else mustsetvar arch "$(dpkg-architecture -qDEB_HOST_ARCH)" "build architecture" fi diff --git a/scripts/debsign.sh b/scripts/debsign.sh index 158ac4a..b129e8a 100755 --- a/scripts/debsign.sh +++ b/scripts/debsign.sh @@ -639,6 +639,10 @@ case $# in then if [ -n "$targetarch" ] && [ -n "$targetgnusystem" ]; then mustsetvar arch "$(dpkg-architecture "-a${targetarch}" "-t${targetgnusystem}" -qDEB_HOST_ARCH)" "build architecture" + elif [ -n "$targetarch" ]; then + mustsetvar arch "$(dpkg-architecture "-a${targetarch}" -qDEB_HOST_ARCH)" "build architecture" + elif [ -n "$targetgnusystem" ]; then + mustsetvar arch "$(dpkg-architecture "-t${targetgnusystem}" -qDEB_HOST_ARCH)" "build architecture" else mustsetvar arch "$(dpkg-architecture -qDEB_HOST_ARCH)" "build architecture" fi diff --git a/scripts/debuild.pl b/scripts/debuild.pl index cfa06bf..6970010 100755 --- a/scripts/debuild.pl +++ b/scripts/debuild.pl @@ -969,8 +969,11 @@ if ($command_version eq 'dpkg') { # Call to dpkg-architecture to set DEB_{BUILD,HOST}_* environment # variables my @dpkgarch = 'dpkg-architecture'; - if ($targetarch && $targetgnusystem) { - push @dpkgarch, "-a${targetarch}", "-t${targetgnusystem}"; + if ($targetarch) { + push @dpkgarch, "-a${targetarch}"; + } + if ($targetgnusystem) { + push @dpkgarch, "-t${targetgnusystem}"; } push @dpkgarch, '-f'; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git _______________________________________________ devscripts-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
