From d329b123b6d061df4b7a6dce938d6d9046b879ae Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 16 Jun 2008 00:05:29 +0300 Subject: [PATCH] dpkg-divert: On renames do no check the target if the source does not exist The rename is going to be disabled anyway in that case. This also allows to remove bogus diversions. Closes: #476973, #469033 --- ChangeLog | 5 +++++ debian/changelog | 3 +++ scripts/dpkg-divert.pl | 3 +++ 3 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index d82c0c2a..4d823db4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-15 Guillem Jover + + * 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 * scripts/dpkg-divert.pl, scripts/update-alternatives.pl, diff --git a/debian/changelog b/debian/changelog index a4ad0bc0..8c54d2f0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ dpkg (1.14.20) UNRELEASED; urgency=low * 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. diff --git a/scripts/dpkg-divert.pl b/scripts/dpkg-divert.pl index 6eca1cfa..56257ed3 100755 --- a/scripts/dpkg-divert.pl +++ b/scripts/dpkg-divert.pl @@ -244,6 +244,9 @@ sub checkrename { 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, $!)); } -- 2.39.5