pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files - Fixed a typo in a diagnostic ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f34b52eb3a56
branches:  trunk
changeset: 514198:f34b52eb3a56
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Jun 08 18:22:46 2006 +0000

description:
- Fixed a typo in a diagnostic message from the buildlink3.mk check.
- Added a warning for "Preformatted manual page without unformatted one".

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diffs (70 lines):

diff -r fae0c31e6bde -r f34b52eb3a56 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Thu Jun 08 18:21:14 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Thu Jun 08 18:22:46 2006 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.615 2006/06/08 17:59:23 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.616 2006/06/08 18:22:46 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -4928,7 +4928,7 @@
 
        # Sixth paragraph: Reference counter.
        if (!expect($lines, \$lineno, qr"^BUILDLINK_DEPTH:=\t+\$\{BUILDLINK_DEPTH:S/\+\$//\}$")) {
-               $lines->[$lineno]->log_warning("Expected BUILDLINK_DEPTH:= \${BUILDLINK_DEPTH:S/+$//}.");
+               $lines->[$lineno]->log_warning("Expected BUILDLINK_DEPTH:= \${BUILDLINK_DEPTH:S/+\$//}.");
                $lines->[$lineno]->explain_warning(
                        "Everything besides the .include lines for the buildlink3.mk files of",
                        "dependencies should go between the .if !empty({PKGNAME}_BUILDLINK3_MK)",
@@ -5661,7 +5661,7 @@
 
 sub checkfile_PLIST($) {
        my ($fname) = @_;
-       my ($lines, $last_file_seen, $libtool_libs);
+       my ($lines, $last_file_seen, $all_files);
 
        log_info($fname, NO_LINE_NUMBER, "[checkfile_PLIST]");
 
@@ -5676,13 +5676,13 @@
        }
        checkline_rcsid($lines->[0], "\@comment ");
 
-       # Get all libtool libraries from the PLIST.
-       $libtool_libs = {};
+       # Get the list of all files from the PLIST.
+       $all_files = {};
        foreach my $line (@{$lines}) {
                my $text = $line->text;
 
-               if ($text =~ qr"^(.*)\.la$") {
-                       $libtool_libs->{$1} = $line;
+               if ($text =~ qr"^\w" && $text !~ regex_unresolved) {
+                       $all_files->{$text} = $line;
                }
        }
 
@@ -5760,6 +5760,12 @@
                        } elsif ($text =~ qr"^lib/[^/]+\.(?:so|a|la)$") {
                                # Fine.
 
+                       } elsif ($text =~ qr"^man/cat(\d)/(.*)\.\d$") {
+                               my ($cat, $manpage) = ($1, $2);
+                               if (!exists($all_files->{"man/man${cat}/${manpage}.${cat}"})) {
+                                       $line->log_warning("Preformatted manual page without unformatted one.");
+                               }
+
                        } elsif ($text =~ qr"^share/doc/html/") {
                                $opt_warn_plist_depr and $line->log_warning("Use of \"share/doc/html\" is deprecated. Use \"share/doc/\${PKGBASE}\" instead.");
 
@@ -5802,8 +5808,8 @@
                        if ($text =~ qr"^(.*)(\.a|\.so[0-9.]*)$") {
                                my ($basename, $ext) = ($1, $2);
 
-                               if (exists($libtool_libs->{$basename})) {
-                                       $line->log_warning("Redundant library found. The libtool library is in line " . $libtool_libs->{$basename}->lines . ".");
+                               if (exists($all_files->{"${basename}.la"})) {
+                                       $line->log_warning("Redundant library found. The libtool library is in line " . $all_files->{"${basename}.la"}->lines . ".");
                                }
                        }
                } else {



Home | Main Index | Thread Index | Old Index