diff options
author | Guillem Jover <guillem@debian.org> | 2019-07-30 04:57:47 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2019-10-30 22:02:43 +0100 |
commit | ae231c65b162df729a6492105a0ce64945e293c2 (patch) | |
tree | 00c400fa0e4bd4759c7c2b450df8afcf706f036d /scripts | |
parent | 36925e06749e495a475f6c42543b226d3f7ae27b (diff) | |
download | dpkg-ae231c65b162df729a6492105a0ce64945e293c2.tar.gz |
Dpkg::Source::Package::V2: Emit a special patch header on single-debian-patch
The previous default patch header does not make sense for a conglomerate
patch. Instead provide a more suitable default, that can always be
overridden with either the local-patch-header or patch-header files.
Closes: #933152
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Dpkg/Source/Package/V2.pm | 12 |
1 files changed, 12 insertions, 0 deletions
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; |