The following commit has been merged in the lenny branch:
commit d329b123b6d061df4b7a6dce938d6d9046b879ae
Author: Guillem Jover <[EMAIL PROTECTED]>
Date:   Mon Jun 16 00:05:29 2008 +0300

    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

diff --git a/ChangeLog b/ChangeLog
index d82c0c2..4d823db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-15  Guillem Jover  <[EMAIL PROTECTED]>
+
+       * 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  <[EMAIL PROTECTED]>
 
        * scripts/dpkg-divert.pl, scripts/update-alternatives.pl,
diff --git a/debian/changelog b/debian/changelog
index a4ad0bc..8c54d2f 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 6eca1cf..56257ed 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, $!));
     }

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to