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 the Assertion error on .i...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7cfa49572bdb
branches:  trunk
changeset: 522321:7cfa49572bdb
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Dec 06 23:42:43 2006 +0000

description:
Fixed the Assertion error on .include lines that end in trailing
white-space.

Instead of including intltool/buildlink3.mk directly, a simple
USE_TOOLS+=intltool suffices.

diffstat:

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

diffs (31 lines):

diff -r 37cd7be73491 -r 7cfa49572bdb pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Wed Dec 06 23:14:18 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Wed Dec 06 23:42:43 2006 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.685 2006/11/09 23:59:35 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.686 2006/12/06 23:42:43 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -1800,8 +1800,8 @@
 use constant regex_mk_comment  => qr"^ *\s*#(.*)$";
 use constant regex_mk_cond     => qr"^\.(\s*)(if|ifdef|ifndef|else|elif|endif|for|endfor|undef)(?:\s+([^\s#][^#]*?))?\s*(?:#.*)?$";
 use constant regex_mk_dependency=> qr"^([^\s:]+(?:\s*[^\s:]+)*):\s*([^#]*?)(?:\s*#.*)?$";
-use constant regex_mk_include  => qr"^\.\s*s?include\s+\"([^\"]+)\"(?:\s*#.*)?$";
-use constant regex_mk_sysinclude=> qr"^\.\s*s?include\s+<([^>]+)>(?:\s*#.*)?$";
+use constant regex_mk_include  => qr"^\.\s*s?include\s+\"([^\"]+)\"\s*(?:#.*)?$";
+use constant regex_mk_sysinclude=> qr"^\.\s*s?include\s+<([^>]+)>\s*(?:#.*)?$";
 use constant regex_mk_shellvaruse => qr"(?:^|[^\$])\$\$\{?(\w+)\}?"; # XXX: not perfect
 use constant regex_pkgname     => qr"^((?:[\w.+]|-[^\d])+)-(\d(?:\w|\.\d)*)$";
 use constant regex_mk_shellcmd => qr"^\t(.*)$";
@@ -5834,6 +5834,9 @@
                        if ($includefile =~ qr"/x11-links/buildlink3\.mk$") {
                                $line->log_error("${includefile} must not be included directly. Include \"../../mk/x11.buildlink3.mk\" instead.");
                        }
+                       if ($includefile =~ qr"/intltool/buildlink3\.mk$") {
+                               $line->log_warning("Please say \"USE_TOOLS+= intltool\" instead of this line.");
+                       }
                        if ($includefile =~ qr"(.*)/builtin\.mk$") {
                                my ($dir) = ($1);
                                $line->log_error("${includefile} must not be included directly. Include \"${dir}/buildlink3.mk\" instead.");



Home | Main Index | Thread Index | Old Index