chiark / gitweb /
Provide -wdd aka --clean=dpkg-source-d. Closes:#792433.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 18 Jul 2015 13:14:37 +0000 (14:14 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Jul 2015 14:28:51 +0000 (15:28 +0100)
debian/changelog
dgit
dgit.1

index 2a2c20cd4c4277726857be6bd9577084387227e8..6e62f073a02a44f0720f2393acb447c60a4ef85c 100644 (file)
@@ -4,6 +4,9 @@ dgit (0.31~~) unstable; urgency=low
   * dgit(1): Remove some obsolete caveats from BUGS.
   * dgit(1); Mention that -wgf can avoid need for build-deps.
 
+  Useability improvements:
+  * Provide -wdd aka --clean=dpkg-source-d.  Closes:#792433.
+
   Infrastructure:
   * Provide for mirroring git updates to a different server.
   * Provide cgit-regen-config command for cgi-grnet-01.
diff --git a/dgit b/dgit
index 079e5dec7c212c0c4ea1be9ecb76f4891af75cfb..47c55f3905217dd0b25eb0490608889132ca6c22 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2633,6 +2633,8 @@ sub quilt_fixup_editor () {
 sub clean_tree () {
     if ($cleanmode eq 'dpkg-source') {
        runcmd_ordryrun_local @dpkgbuildpackage, qw(-T clean);
+    } elsif ($cleanmode eq 'dpkg-source-d') {
+       runcmd_ordryrun_local @dpkgbuildpackage, qw(-d -T clean);
     } elsif ($cleanmode eq 'git') {
        runcmd_ordryrun_local @git, qw(clean -xdf);
     } elsif ($cleanmode eq 'git-ff') {
@@ -2731,6 +2733,9 @@ sub build_source {
     if ($cleanmode eq 'dpkg-source') {
        runcmd_ordryrun_local (@dpkgbuildpackage, qw(-us -uc -S)),
            changesopts();
+    } elsif ($cleanmode eq 'dpkg-source-d') {
+       runcmd_ordryrun_local (@dpkgbuildpackage, qw(-us -uc -S -d)),
+           changesopts();
     } else {
        my $pwd = must_getcwd();
        my $leafdir = basename $pwd;
@@ -2873,7 +2878,7 @@ sub parseopts () {
            } elsif (m/^--build-products-dir=(.*)/s) {
                push @ropts, $_;
                $buildproductsdir = $1;
-           } elsif (m/^--clean=(dpkg-source|git|git-ff|none)$/s) {
+           } elsif (m/^--clean=(dpkg-source(?:-d)?|git|git-ff|none)$/s) {
                push @ropts, $_;
                $cleanmode = $1;
            } elsif (m/^--clean=(.*)$/s) {
@@ -2951,6 +2956,9 @@ sub parseopts () {
                } elsif (s/^-wd$//s) {
                    push @ropts, $&;
                    $cleanmode = 'dpkg-source';
+               } elsif (s/^-wdd$//s) {
+                   push @ropts, $&;
+                   $cleanmode = 'dpkg-source-d';
                } else {
                    badusage "unknown short option \`$_'";
                }
diff --git a/dgit.1 b/dgit.1
index 2d06fd999f9347d85bdb6e3047ee8156de8f4e69..698bf2fdd0369cc8ef8bd91e069e52cb519b3248 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -288,6 +288,15 @@ Use dpkg-buildpackage to do the clean, so that the source package
 is cleaned by dpkg-source running the package's clean target.
 This is the default.  It requires the package's build dependencies.
 .TP
+.BR --clean=dpkg-source-d " | " -wdd
+Use
+.B dpkg-buildpackage -d
+to do the clean, so that the source package
+is cleaned by dpkg-source running the package's clean target.
+The build-dependencies are not checked (due to
+.BR -d ),
+which violates policy, but may work in practice.
+.TP
 .BR -N " | " --new
 The package may be new in this suite.  Without this, dgit will
 refuse to push.