chiark / gitweb /
dgit: buile_prep_early: Call notpushing() after getting $isuite
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 10 Jan 2017 15:34:06 +0000 (15:34 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 10 Jan 2017 15:34:35 +0000 (15:34 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit

index 607b2cd546abd7e39e85cae6d18703b2621b3a07..27cda33d02e648d161e35c4ef8258c1dc366b385 100644 (file)
@@ -2,6 +2,7 @@ dgit (3.1~) unstable; urgency=medium
 
   Bugfixes:
   * dgit import-dsc: Do not crash with undefined $isuite.  Closes:#850781.
 
   Bugfixes:
   * dgit import-dsc: Do not crash with undefined $isuite.  Closes:#850781.
+  * dgit build: Do not sometimes crash with undefined $isuite.
   * dgit: Do not nedlessly re-fetch the rewrite map.
   * dgit: After downloading .debian.* files, save them in `..', too
     (ie do this not just for .origs).
   * dgit: Do not nedlessly re-fetch the rewrite map.
   * dgit: After downloading .debian.* files, save them in `..', too
     (ie do this not just for .origs).
diff --git a/dgit b/dgit
index a51c8782b928196dff51e8d1ac35f0eefc86d941..a18d0181542cdb9a0485ad239973a53f87cdcf43 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -5663,12 +5663,12 @@ sub cmd_clean () {
 sub build_prep_early () {
     our $build_prep_early_done //= 0;
     return if $build_prep_early_done++;
 sub build_prep_early () {
     our $build_prep_early_done //= 0;
     return if $build_prep_early_done++;
-    notpushing();
     badusage "-p is not allowed when building" if defined $package;
     my $clogp = parsechangelog();
     $isuite = getfield $clogp, 'Distribution';
     $package = getfield $clogp, 'Source';
     $version = getfield $clogp, 'Version';
     badusage "-p is not allowed when building" if defined $package;
     my $clogp = parsechangelog();
     $isuite = getfield $clogp, 'Distribution';
     $package = getfield $clogp, 'Source';
     $version = getfield $clogp, 'Version';
+    notpushing();
     check_not_dirty();
 }
 
     check_not_dirty();
 }