Bläddra i källkod

dpkg-buildpackage: Move sign-command setup just after gain-root-command

This will allow performing more thorough checks on the value, before
printing any build progress.
Guillem Jover 12 år sedan
förälder
incheckning
c2674f7007
1 ändrade filer med 10 tillägg och 10 borttagningar
  1. 10 10
      scripts/dpkg-buildpackage.pl

+ 10 - 10
scripts/dpkg-buildpackage.pl

@@ -291,6 +291,16 @@ if ($< == 0) {
     }
 }
 
+if (!defined $signcommand &&
+    (($ENV{GNUPGHOME} && -e $ENV{GNUPGHOME}) ||
+     ($ENV{HOME} && -e "$ENV{HOME}/.gnupg"))) {
+    if (find_command('gpg2')) {
+        $signcommand = 'gpg2';
+    } elsif (find_command('gpg')) {
+        $signcommand = 'gpg';
+    }
+}
+
 my $build_opts = Dpkg::BuildOptions->new();
 if (defined $parallel) {
     $parallel = $build_opts->get('parallel') if $build_opts->has('parallel');
@@ -341,16 +351,6 @@ 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"))) {
-    if (find_command('gpg2')) {
-        $signcommand = 'gpg2';
-    } elsif (find_command('gpg')) {
-        $signcommand = 'gpg';
-    }
-}
-
 if (not $signcommand) {
     $signsource = 0;
     $signchanges = 0;