The rename is going to be disabled anyway in that case. This also allows
to remove bogus diversions. Closes: #476973, #469033
+2008-05-15 Guillem Jover <guillem@debian.org>
+
+ * scripts/dpkg-divert.pl (checkrename): Do not check the target file
+ if the source does not exist and dorename was thus disabled.
+
2008-06-09 Raphael Hertzog <hertzog@debian.org>
* scripts/dpkg-divert.pl, scripts/update-alternatives.pl,
* Document triggers --debug values in dpkg.1. Thanks to Sven Joachim.
* Improve package descriptions for dpkg, dpkg-dev and dselect.
Thanks to Justin B Rye for the review and corrections. Closes: #484002
+ * When dpkg-divert does renames do no check the target file if the source
+ does not exist and the rename is thus being disabled. This also allows
+ to remove bogus diversions. Closes: #476973, #469033
[ Raphael Hertzog ]
* Add missing 'use File::Path' in Dpkg::Source::Package::V3::quilt.
unlink ("${rsrc}.dpkg-devert.tmp");
} elsif ($! == ENOENT) {
$dorename = !$dorename;
+ # If the source file is not present and we are not going to do the
+ # rename anyway there's no point in checking the target.
+ return;
} else {
quit(sprintf(_g("error checking \`%s': %s"), $rsrc, $!));
}