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

Bug#516067: lintian: false positives when checking the same package version from different archs



Raphael Geissert <atomo64@gmail.com> writes:

> -v isn't helpful at all, only -d is a bit more, but the issue is a bit
> obscure. Attached is the output of -d on just a subset of the packages.

This is why I hate the Perl coding style that uses /o on regexes.  It
produces some horribly obscure errors that are almost impossible to track
down.

The following patch fixes it:

--- a/checks/binaries
+++ b/checks/binaries
@@ -266,7 +266,7 @@ $depends =~ s/\n/ /g;
 if ($needs_depends_line) {
     if ($depends && $needs_libc && $pkg !~ /^libc[\d.]+(-|\z)/) {
         # Match libcXX or libcXX-*, but not libc3p0.
-        my $re = qr/(?:^|,)\s*\Q$needs_libc\E\b/o;
+        my $re = qr/(?:^|,)\s*\Q$needs_libc\E\b/;
         if ($depends !~ /$re/) {
             my $others = '';
            $needs_libc_count--;

$needs_libc is libc6.1, not libc6, on alpha, and then since the regex was
built with /o, $needs_libc wasn't interpolated again on other platforms.

Thanks for the report!

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: