summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-08-21 13:11:28 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2015-08-21 17:28:08 +0100
commitbf86f2e38968230777c9f158ed9099d547ca6883 (patch)
treef95515e2c9689f3e3b71cfcc0f7c1e0d5f6f9757 /dgit
parentd3ef78f92fef4ee7698881456fa93db50db54372 (diff)
Cope properly with `3.0 (quilt)' with single-debian-patch. Closes:#796016.
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit28
1 files changed, 26 insertions, 2 deletions
diff --git a/dgit b/dgit
index 352ff8e..eaba82b 100755
--- a/dgit
+++ b/dgit
@@ -2754,8 +2754,7 @@ sub build_maybe_quilt_fixup () {
$upstreamversion =~ s/-[^-]*$//;
if ($fopts->{'single-debian-patch'}) {
- #quilt_fixup_singlepatch($clogp, $headref, $upstreamversion);
- die;
+ quilt_fixup_singlepatch($clogp, $headref, $upstreamversion);
} else {
quilt_fixup_multipatch($clogp, $headref, $upstreamversion);
}
@@ -2791,6 +2790,31 @@ sub quilt_fixup_delete_pc () {
commit_admin "Commit removal of .pc (quilt series tracking data)";
}
+sub quilt_fixup_singlepatch ($$$) {
+ my ($clogp, $headref, $upstreamversion) = @_;
+
+ # dpkg-source --commit generates new patches even if
+ # single-debian-patch is in debian/source/options. In order to
+ # get it to generate debian/patches/debian-changes, it is
+ # necessary to build the source package.
+
+ quilt_fixup_linkorigs($upstreamversion, sub { });
+ quilt_fixup_mkwork($headref);
+
+ rmtree("debian/patches");
+
+ runcmd @dpkgsource, qw(-b .);
+ chdir "..";
+ runcmd @dpkgsource, qw(-x), (srcfn $version, ".dsc");
+ rename srcfn("$upstreamversion", "/debian/patches"),
+ "work/debian/patches";
+
+ chdir "work";
+ commit_quilty_patch();
+
+
+}
+
sub quilt_fixup_multipatch ($$$) {
my ($clogp, $headref, $upstreamversion) = @_;