[devscripts] 01/01: debuild: Don't set a hook to just "cd ..; "

James McCoy jamessan at debian.org
Wed Nov 30 05:10:24 UTC 2016


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

jamessan pushed a commit to branch master
in repository devscripts.

commit f60c5c6de32ea8b7f3de92bf721109ce6ec42c0c
Author: James McCoy <jamessan at debian.org>
Date:   Wed Nov 30 00:06:56 2016 -0500

    debuild: Don't set a hook to just "cd ..; "
    
    In 3e71ba36160b9fb5d03d755f94da14093e742a4b, code was added to ensure
    debuild ran hooks from the correct directory (in source or in parent)
    per the expected behavior.  However, that was also causing hooks to be
    set to "cd ..; " if it was a hook that required directory adjustment but
    there was no hook command set.
    
    Ensure a hook command exists first, so we don't have the harmless, but
    odd, hook command set.
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog   | 7 +++++++
 scripts/debuild.pl | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 25eb37b..671833a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+devscripts (2.16.11) UNRELEASED; urgency=medium
+
+  * debuild:
+    + Avoid setting a hook to just "cd ..; ".
+
+ -- James McCoy <jamessan at debian.org>  Wed, 30 Nov 2016 00:05:18 -0500
+
 devscripts (2.16.10) unstable; urgency=medium
 
   [ Afif Elghraoui ]
diff --git a/scripts/debuild.pl b/scripts/debuild.pl
index b40c412..9f91719 100755
--- a/scripts/debuild.pl
+++ b/scripts/debuild.pl
@@ -1071,7 +1071,7 @@ sub setDebuildHook() {
 	fatal "unknown hook $name,\nrun $progname --help for usage information";
     }
 
-    if ($externalHook{$name} && $dpkgHook{$name}) {
+    if ($externalHook{$name} && $dpkgHook{$name} && $val) {
 	$hook{$name} = 'cd ..; '.$val;
     }
     else {
@@ -1086,7 +1086,7 @@ sub setDpkgHook() {
 	fatal "unknown hook $name,\nrun $progname --help for usage information";
     }
 
-    if ($externalHook{$name} && !$dpkgHook{$name}) {
+    if ($externalHook{$name} && !$dpkgHook{$name} && $val) {
 	$hook{$name} = 'cd ..; '.$val;
     }
     else {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list