This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=a71649166e7dabbce315c8e49501ba68676831ef commit a71649166e7dabbce315c8e49501ba68676831ef Author: Guillem Jover <[email protected]> AuthorDate: Mon Nov 5 23:57:52 2018 +0100 Dpkg::Source::Patch: Do not recommend --include-removal when not supported If the option has not been set, then the source format does not support it and we should thus not recommend the --include-removal option in the warning. Closes: #913012 --- debian/changelog | 2 ++ scripts/Dpkg/Source/Patch.pm | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index d43a06258..88e6f9b48 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ dpkg (1.19.3) UNRELEASED; urgency=medium - Dpkg::Shlibs::Objdump: Remove unused Dpkg::IPC import. - Dpkg::Shlibs::Objdump: Only select objdump program when going to use it. - Dpkg::Source::Package: Do not reinitialize fields member in constructor. + - Dpkg::Source::Patch: Do not recommend --include-removal when not + supported. Closes: #913012 * Documentation: - dpkg(1): Clarify --remove action. Closes: #914478 - dpkg-query(1): Clarify --list option behavior when no arguments are diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm index e5ad5424b..25d56335d 100644 --- a/scripts/Dpkg/Source/Patch.pm +++ b/scripts/Dpkg/Source/Patch.pm @@ -148,7 +148,6 @@ sub add_diff_directory { # TODO: make this function more configurable # - offer to disable some checks my $basedir = $opts{basedirname} || basename($new); - my $inc_removal = $opts{include_removal} // 0; my $diff_ignore; if ($opts{diff_ignore_func}) { $diff_ignore = $opts{diff_ignore_func}; @@ -226,11 +225,13 @@ sub add_diff_directory { return if $files_in_new{$fn}; lstat("$old/$fn") or syserr(g_('cannot stat file %s'), "$old/$fn"); if (-f _) { - if ($inc_removal) { + if (not defined $opts{include_removal}) { + warning(g_('ignoring deletion of file %s'), $fn); + } elsif (not $opts{include_removal}) { + warning(g_('ignoring deletion of file %s, use --include-removal to override'), $fn); + } else { push @diff_files, [$fn, 0, 0, "$old/$fn", '/dev/null', "$basedir.orig/$fn", '/dev/null']; - } else { - warning(g_('ignoring deletion of file %s, use --include-removal to override'), $fn); } } elsif (-d _) { warning(g_('ignoring deletion of directory %s'), $fn); -- Dpkg.Org's dpkg

