summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Source/Patch.pm
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-11-26 14:00:30 +0300
committerIgor Pashev <pashev.igor@gmail.com>2019-11-26 14:00:30 +0300
commit414ea1706306e061fc44a8b5ce3042d4f0728489 (patch)
treeef0b2c4eac79e479ed686a5d88d7b3b954717824 /scripts/Dpkg/Source/Patch.pm
parented2b463626bd721942143baa6207f2ccac67a616 (diff)
parent89afa9af7cd589eb8384ed96b6d86dd59d56bdf5 (diff)
downloaddpkg-414ea1706306e061fc44a8b5ce3042d4f0728489.tar.gz
Merge https://salsa.debian.org/dpkg-team/dpkg
Diffstat (limited to 'scripts/Dpkg/Source/Patch.pm')
-rw-r--r--scripts/Dpkg/Source/Patch.pm9
1 files changed, 5 insertions, 4 deletions
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);