summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-07-18 14:14:37 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2015-07-19 15:28:51 +0100
commitea3d6683dcb55e588833e59af9f740709cd709b5 (patch)
tree5a55760d8b6efa5ee02b4caeecb93119a365952f
parent2a532c4b2d21ff5bb583c8df94b0208d99c7b24d (diff)
Provide -wdd aka --clean=dpkg-source-d. Closes:#792433.
-rw-r--r--debian/changelog3
-rwxr-xr-xdgit10
-rw-r--r--dgit.19
3 files changed, 21 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 2a2c20c..6e62f07 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 079e5de..47c55f3 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 2d06fd9..698bf2f 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.