[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.15-9-gc811a26



The following commit has been merged in the master branch:
commit c811a2674cda16a68cf69393afe415f7c22ae0ab
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Jul 27 23:07:18 2013 +0200

    c/scripts.pm: Assume dpkg-divert >= 1.16
    
    Assume dpkg-divert is now from dpkg >= 1.16.  That is, assume that it
    will default to --package in the absence of --local and --package.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/scripts.pm b/checks/scripts.pm
index b7c069b..c73034a 100644
--- a/checks/scripts.pm
+++ b/checks/scripts.pm
@@ -829,7 +829,7 @@ while (<$ctrl_fd>) {
             tag 'maintainer-script-uses-dpkg-status-directly', $file;
         }
         if (m,$LEADIN(?:/usr/sbin/)?dpkg-divert\s, && ! /--(?:help|list|truename|version)/) {
-            if (/--local/ || !m/--package/) {
+            if (/--local/) {
                 tag 'package-uses-local-diversion', "$file:$.";
             }
             my $mode = /--remove/ ? 'remove' : 'add';
diff --git a/debian/changelog b/debian/changelog
index 315f71d..b5d5529 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,11 @@ lintian (2.5.16) UNRELEASED; urgency=low
       "AllowOverride".  Thanks to Jean-Michel Vourgère
       for the report and an initial patch.
       (Closes: #717621)
+  * checks/scripts.pm:
+    + [NT] Stop emitting package-uses-local-diversion for
+      calls to dpkg-divert without --package as dpkg 1.16.0
+      (Wheezy) handles this case correctly.  Thanks to
+      Raphaël Hertzog for the report.  (Closes: #679132)
 
   * debian/changelog:
     + [NT] Correct some older tag summaries to include some
diff --git a/t/tests/scripts-diversions/debian/debian/preinst b/t/tests/scripts-diversions/debian/debian/preinst
index 2116ef4..b590f9d 100644
--- a/t/tests/scripts-diversions/debian/debian/preinst
+++ b/t/tests/scripts-diversions/debian/debian/preinst
@@ -11,7 +11,7 @@ if [ install = "$1"  ]; then
     dpkg-divert --local --add --divert /usr/share/scripts/other-file.real \
         /usr/share/scripts/other-file
 
-    # This is also broken; the default is --local if --package isn't there.
+    # This was broken until dpkg 1.16.0 (Wheezy), see #679132
     dpkg-divert --add --divert /usr/share/scripts/another-file.real \
         /usr/share/scripts/another-file
 
diff --git a/t/tests/scripts-diversions/tags b/t/tests/scripts-diversions/tags
index eecabfb..0f026c9 100644
--- a/t/tests/scripts-diversions/tags
+++ b/t/tests/scripts-diversions/tags
@@ -5,5 +5,4 @@ E: scripts-diversions: orphaned-diversion usr/share/scripts/another-file preinst
 E: scripts-diversions: orphaned-diversion usr/share/scripts/orphan preinst
 E: scripts-diversions: package-uses-local-diversion postrm:31
 E: scripts-diversions: package-uses-local-diversion preinst:12
-E: scripts-diversions: package-uses-local-diversion preinst:16
 E: scripts-diversions: remove-of-unknown-diversion usr/share/scripts/old-file postrm:12

-- 
Debian package checker


Reply to: