chiark / gitweb /
dgit: build_prep: Provide it with $wantsrc
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 26 Jul 2018 09:36:01 +0000 (10:36 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 26 Jul 2018 10:17:21 +0000 (11:17 +0100)
No functional change yet as it doesn't use it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index db52f91ef04a04c4deb2179c04f006bf1cb02975..b1df95eea8915ddddeb50ead05ad5c9de2eb4f57 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -6134,7 +6134,8 @@ sub build_prep_early () {
     check_not_dirty();
 }
 
-sub build_prep () {
+sub build_prep ($) {
+    my ($wantsrc) = @_;
     build_prep_early();
     clean_tree();
     build_maybe_quilt_fixup();
@@ -6323,7 +6324,7 @@ sub cmd_build {
     build_prep_early();
     my @dbp = (@dpkgbuildpackage, qw(-us -uc), changesopts_initial(), @ARGV);
     my $wantsrc = massage_dbp_args \@dbp;
-    build_prep();
+    build_prep($wantsrc);
     if ($wantsrc & WANTSRC_SOURCE) {
        build_source();
        midbuild_checkchanges_vanilla $wantsrc;
@@ -6395,7 +6396,7 @@ sub cmd_gbp_build {
        }
     }
 
-    build_prep();
+    build_prep($wantsrc);
     if ($wantsrc & WANTSRC_SOURCE) {
        build_source();
        midbuild_checkchanges_vanilla $wantsrc;
@@ -6451,14 +6452,14 @@ sub build_source {
 
 sub cmd_build_source {
     badusage "build-source takes no additional arguments" if @ARGV;
-    build_prep();
+    build_prep(WANTSRC_SOURCE);
     build_source();
     maybe_unapply_patches_again();
     printdone "source built, results in $dscfn and $sourcechanges";
 }
 
 sub cmd_sbuild {
-    build_prep(); # not BUILDER because sbuild uses the .dsc
+    build_prep(WANTSRC_SOURCE); # not BUILDER because sbuild uses the .dsc
     build_source();
     midbuild_checkchanges();
     in_bpd {