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

[SCM] Debian package checker branch, master, updated. 2.5.11-74-g38cbc22



The following commit has been merged in the master branch:
commit 38cbc2268a522684cfc6109a4ac56e4af0819489
Author: Niels Thykier <niels@thykier.net>
Date:   Fri Jan 18 13:15:34 2013 +0100

    c/symlinks: Add a tag for broken symlinks with "*"-targets
    
    A broken link with a target including a "*" is much more likely to be
    a broken symlink (caused by a failed glob-expansion), so add a
    non-experimental tag for that.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/symlinks b/checks/symlinks
index 01c5213..005dcf1 100644
--- a/checks/symlinks
+++ b/checks/symlinks
@@ -92,7 +92,13 @@ foreach my $blink (@brokenlinks){
         next BLINK if $dinfo->index ($path) || $dinfo->index ("$path/");
     }
     # nope - not found in any of our direct dependencies.
-    tag 'package-contains-broken-symlink', $file, $target
+    if ($target =~ m/\*/) {
+        # If it contains a "*" it probably a bad ln -s target/*.so link
+        # expansion.
+        tag 'package-contains-broken-symlink-wildcard', $file, $target
+    } else {
+        tag 'package-contains-broken-symlink', $file, $target
+    }
 }
 
 }
diff --git a/checks/symlinks.desc b/checks/symlinks.desc
index a88795e..cdde6ea 100644
--- a/checks/symlinks.desc
+++ b/checks/symlinks.desc
@@ -12,3 +12,11 @@ Experimental: yes
 Info: The package contains a symlink but the destination
  for the link does not exist in the package nor in its
  direct dependencies.
+
+Tag: package-contains-broken-symlink-wildcard
+Severity: normal
+Certainty: possible
+Info: The package contains a symlink with a target that
+ appears to be a "failed" wildcard expansion.  Furthermore
+ the target does not exists in the package or any of its
+ direct dependencies (built from the same source).
diff --git a/debian/changelog b/debian/changelog
index 76659b8..bdbccc6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ lintian (2.5.12) UNRELEASED; urgency=low
       - dir-or-file-in-home
       - license-problem-gfdl-invariants
       - menu-icon-uses-relative-path
+      - package-contains-broken-symlink-wildcard
       - vcs-field-bitrotted
       - vcs-git-uses-invalid-user-uri
 
@@ -37,9 +38,6 @@ lintian (2.5.12) UNRELEASED; urgency=low
       to suppress empty-binary-package.  Lintian will still
       accept it the phrase for now.
     + [NT] Accept libx32 as an bi-arch directory.
-  * checks/shared-libs:
-    + [NT] Special case gcc packages when looking for dev symlinks.
-      gcc stores its dev symlinks in some special directories.
   * checks/menu-format{,.desc}:
     + [NT] Apply patch from Bastien Roucariès to detect missing
       "Keywords" in desktop files.  Thanks to Jeremy Bicha for
@@ -48,6 +46,14 @@ lintian (2.5.12) UNRELEASED; urgency=low
       "Science" category.  (Closes: #697693)
     + [NT] Apply patch from Thomas Preud'homme to detect uses of
       relative icons in menu files.  (Closes: #697916)
+  * checks/shared-libs:
+    + [NT] Special case gcc packages when looking for dev symlinks.
+      gcc stores its dev symlinks in some special directories.
+  * checks/symlinks{,.desc}:
+    + [NT] Warn about broken symlinks that contains a literal "*"
+      in their target.  This is usually a sign that a wildcard did
+      not properly expand.  Thanks to Bernd Zeimetz for the report.
+      (Closes: #683737)
 
   * collection/strings:
     + [NT] Fix a regression in filtering out "debug" ELF binaries.
diff --git a/t/tests/symlinks-broken/debian/debian/broken-links.links b/t/tests/symlinks-broken/debian/debian/broken-links.links
index efcf9de..2364bbe 100644
--- a/t/tests/symlinks-broken/debian/debian/broken-links.links
+++ b/t/tests/symlinks-broken/debian/debian/broken-links.links
@@ -1,6 +1,9 @@
 # broken links
 usr/share/broken-links/some.data usr/lib/broken-links/some.data
 etc/some.conf usr/lib/broken-links/some.conf
+# At the time of writing, debhelper does not expand wildcard in
+# links files.
+etc/some-*.conf usr/lib/broken-links/some-other.conf
 
 # valid links
 usr/share/data-pkg/valid.data usr/lib/data-pkg/valid.data
diff --git a/t/tests/symlinks-broken/desc b/t/tests/symlinks-broken/desc
index ba92554..a4a7f34 100644
--- a/t/tests/symlinks-broken/desc
+++ b/t/tests/symlinks-broken/desc
@@ -4,3 +4,4 @@ Version: 1.0
 Description: General tests broken symlinks
 Test-For:
  package-contains-broken-symlink
+ package-contains-broken-symlink-wildcard
diff --git a/t/tests/symlinks-broken/tags b/t/tests/symlinks-broken/tags
index d3dd1ab..c386843 100644
--- a/t/tests/symlinks-broken/tags
+++ b/t/tests/symlinks-broken/tags
@@ -1,2 +1,3 @@
+W: broken-links: package-contains-broken-symlink-wildcard usr/lib/broken-links/some-other.conf etc/some-*.conf
 X: broken-links: package-contains-broken-symlink usr/lib/broken-links/some.conf etc/some.conf
 X: broken-links: package-contains-broken-symlink usr/lib/broken-links/some.data ../../share/broken-links/some.data

-- 
Debian package checker


Reply to: