summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rw-r--r--scripts/Dpkg/Source/Package/V2.pm12
2 files changed, 14 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index a18c3b892..e559872dd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,8 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
- Dpkg::Source::Package: Verify original tarball signatures at build time.
- Dpkg::BuildFlags: Add new unset() method.
Requested by Daniel Schepler <dschepler@gmail.com>.
+ - Dpkg::Source::Package::V2: Emit a special patch header on
+ single-debian-patch. Closes: #933152
* Documentation:
- man: Fix uncommon wording constructs.
- man: Use a minus sign for a literal string.
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index 3da317550..d84fce2dd 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -587,6 +587,7 @@ sub do_build {
sub _get_patch_header {
my ($self, $dir) = @_;
+
my $ph = File::Spec->catfile($dir, 'debian', 'source', 'local-patch-header');
unless (-f $ph) {
$ph = File::Spec->catfile($dir, 'debian', 'source', 'patch-header');
@@ -594,6 +595,17 @@ sub _get_patch_header {
if (-f $ph) {
return file_slurp($ph);
}
+
+ if ($self->{options}->{single_debian_patch}) {
+ return <<'AUTOGEN_HEADER';
+This is an autogenerated patch header for a single-debian-patch file. The
+delta against upstream is either kept as a single patch, or maintained
+in some VCS, and exported as a single patch instead of more manageable
+atomic patches.
+
+AUTOGEN_HEADER
+ }
+
my $ch_info = changelog_parse(offset => 0, count => 1,
file => File::Spec->catfile($dir, 'debian', 'changelog'));
return '' if not defined $ch_info;