pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Added the BrokenIn data type. A...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e4d8ebf2ac2a
branches:  trunk
changeset: 509618:e4d8ebf2ac2a
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Mar 12 13:34:53 2006 +0000

description:
Added the BrokenIn data type. All BROKEN_IN lines generate an additional
note that tells the user to remove the line if the package builds.

diffstat:

 pkgtools/pkglint/files/makevars.map |   4 ++--
 pkgtools/pkglint/files/pkglint.pl   |  10 +++++++++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r c5aab9db341a -r e4d8ebf2ac2a pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map       Sun Mar 12 13:16:39 2006 +0000
+++ b/pkgtools/pkglint/files/makevars.map       Sun Mar 12 13:34:53 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.74 2006/03/11 18:38:35 rillig Exp $
+# $NetBSD: makevars.map,v 1.75 2006/03/12 13:34:53 rillig Exp $
 #
 
 # This file contains the guessed type of some variables, according to
@@ -49,7 +49,7 @@
 BDB_TYPE               Readonly
 BROKEN                 Message
 BROKEN_GETTEXT_DETECTION       YesNo
-BROKEN_IN              List of { pkgsrc-2005Q4 }
+BROKEN_IN              List of BrokenIn
 BUILDLINK_CONTENTS_FILTER      List of ShellWord
 # ^^ ShellCommand
 BUILDLINK_CFLAGS       List+ of CFlag
diff -r c5aab9db341a -r e4d8ebf2ac2a pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sun Mar 12 13:16:39 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sun Mar 12 13:34:53 2006 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.547 2006/03/11 18:38:35 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.548 2006/03/12 13:34:53 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -2882,6 +2882,14 @@
        if ($type eq "AwkCommand") {
                $opt_debug and $line->log_warning("Unchecked AWK command: ${value}");
 
+       } elsif ($type eq "BrokenIn") {
+               if ($value ne $value_novar) {
+                       $line->log_error("${varname} must not refer to other variables.");
+               } elsif ($value =~ qr"^(\d\d\d\d)Q(\d)$") {
+                       # Fine.
+               }
+               $line->log_note("Please remove this line if the package builds for you.");
+
        } elsif ($type eq "BuildlinkDepmethod") {
                if ($value ne $value_novar) {
                        # No checks yet.



Home | Main Index | Thread Index | Old Index