The following commit has been merged in the master branch:
commit 07dc8aea5d0c1ffcad2f578ee780a6ae7db7fef1
Author: Guillem Jover <[email protected]>
Date: Wed Apr 3 05:17:01 2013 +0200
dpkg-buildpackage: Move signing setup code at the end of environment setup
This bundles all signing setup in a single place, and avoids invoking
any command if there's no need.
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index 768fb6e..6812c91 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -108,13 +108,7 @@ sub usage {
my @debian_rules = ("debian/rules");
my @rootcommand = ();
-my $signcommand = '';
-if ( ( ($ENV{GNUPGHOME} && -e $ENV{GNUPGHOME})
- || ($ENV{HOME} && -e "$ENV{HOME}/.gnupg") )
- && find_command('gpg')) {
- $signcommand = 'gpg';
-}
-
+my $signcommand;
my ($admindir, $signkey, $usepause, $noclean,
$cleansource, $since, $maint,
$changedby, $desc, $parallel);
@@ -271,11 +265,6 @@ if ($< == 0) {
}
}
-unless ($signcommand) {
- $signsource = 0;
- $signchanges = 0;
-}
-
my $build_opts = Dpkg::BuildOptions->new();
if (defined $parallel) {
$parallel = $build_opts->get("parallel") if $build_opts->has("parallel");
@@ -326,6 +315,18 @@ if (build_sourceonly) {
$arch = mustsetvar($ENV{'DEB_HOST_ARCH'}, _g('host architecture'));
}
+if (!defined $signcommand &&
+ (($ENV{GNUPGHOME} && -e $ENV{GNUPGHOME}) ||
+ ($ENV{HOME} && -e "$ENV{HOME}/.gnupg")) &&
+ find_command('gpg')) {
+ $signcommand = 'gpg';
+}
+
+if (not $signcommand) {
+ $signsource = 0;
+ $signchanges = 0;
+}
+
# Preparation of environment stops here
(my $sversion = $version) =~ s/^\d+://;
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]