[devscripts] 05/18: debuild: Learn dpkg's --hook-(sign|done) flags

James McCoy jamessan at debian.org
Wed Nov 23 18:11:31 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 c973b593c14b7ba6cd3d390c3e4d0a846b76689f
Author: James McCoy <jamessan at debian.org>
Date:   Sun Nov 20 09:05:56 2016 -0700

    debuild: Learn dpkg's --hook-(sign|done) flags
    
    Since dpkg-buildpackage returns control to debuild before it can run the
    sign/done hooks, debuild needs to understand those flags and instead run
    its signing/post-dpkg-buildpackage hooks.
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 scripts/debuild.pl | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/scripts/debuild.pl b/scripts/debuild.pl
index 461d50f..b5d402e 100755
--- a/scripts/debuild.pl
+++ b/scripts/debuild.pl
@@ -585,6 +585,21 @@ my @preserve_vars = qw(TERM HOME LOGNAME PGPPATH GNUPGHOME GPG_AGENT_INFO
 	    next;
 	}
 
+	if ($arg =~ /^--hook-(sign|done)=(.*)$/) {
+	    my $name = $1;
+	    my $opt = $2;
+	    unless (defined($opt)) {
+		fatal "$arg requires an argmuent,\nrun $progname --help for usage information";
+	    }
+	    if ($name eq 'sign') {
+		$hook{signing} = $opt;
+	    }
+	    else {
+		$hook{'post-dpkg-buildpackage'} = $opt;
+	    }
+	    next;
+	}
+
 	if ($arg eq '--clear-hooks') { $hook{@hooks} = ('') x @hooks; next; }
 
 	# Not a debuild option, so give up.

-- 
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