chiark / gitweb /
dgit: Abolish obsolete variable $clean_using_builder
[dgit.git] / dgit
diff --git a/dgit b/dgit
index a443e5d3c93e0984991b0e678723b5f893bff507..9c1f3e51e02d3697ec2a0b3875eabe0568ca4dc7 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -6199,14 +6199,9 @@ sub maybe_unapply_patches_again () {
 
 #----- other building -----
 
 
 #----- other building -----
 
-our $clean_using_builder;
-# ^ tree is to be cleaned by dpkg-source's builtin idea that it should
-#   clean the tree before building (perhaps invoked indirectly by
-#   whatever we are using to run the build), rather than separately
-#   and explicitly by us.
-
 sub clean_tree () {
 sub clean_tree () {
-    return if $clean_using_builder;
+    # We always clean the tree ourselves, rather than leave it to the
+    # builder (dpkg-source, or soemthing which calls dpkg-source).
     if ($cleanmode eq 'dpkg-source') {
        maybe_apply_patches_dirtily();
        runcmd_ordryrun_local @dpkgbuildpackage, qw(-T clean);
     if ($cleanmode eq 'dpkg-source') {
        maybe_apply_patches_dirtily();
        runcmd_ordryrun_local @dpkgbuildpackage, qw(-T clean);
@@ -6548,9 +6543,7 @@ sub cmd_gbp_build {
        build_source();
        midbuild_checkchanges_vanilla $wantsrc;
     } else {
        build_source();
        midbuild_checkchanges_vanilla $wantsrc;
     } else {
-       if (!$clean_using_builder) {
-           push @cmd, '--git-cleaner=true';
-       }
+       push @cmd, '--git-cleaner=true';
     }
     maybe_unapply_patches_again();
     if ($wantsrc & WANTSRC_BUILDER) {
     }
     maybe_unapply_patches_again();
     if ($wantsrc & WANTSRC_BUILDER) {