From: Ian Jackson Date: Sat, 18 Jul 2015 13:14:37 +0000 (+0100) Subject: Provide -wdd aka --clean=dpkg-source-d. Closes:#792433. X-Git-Tag: debian/1.0~24 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=ea3d6683dcb55e588833e59af9f740709cd709b5 Provide -wdd aka --clean=dpkg-source-d. Closes:#792433. --- diff --git a/debian/changelog b/debian/changelog index 2a2c20cd..6e62f073 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 079e5dec..47c55f39 100755 --- 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 2d06fd99..698bf2fd 100644 --- 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.