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 a hack to be able to pa...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/723189160c90
branches:  trunk
changeset: 507283:723189160c90
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Mon Jan 30 01:26:04 2006 +0000

description:
- Added a hack to be able to parse nested make(1) variables like
  ${TOOL.${t}}. They just extend up to, but not including the next space or
  quote character.
- log_debug() is used for printing debugging info, not log_error().
- Even if NO_CHECKSUM is set, distinfo files may exist if the package has
  patches. Noted by salo.

diffstat:

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

diffs (36 lines):

diff -r 9e4a1a87eb20 -r 723189160c90 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Mon Jan 30 00:57:59 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Mon Jan 30 01:26:04 2006 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.496 2006/01/29 01:29:38 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.497 2006/01/30 01:26:04 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -1236,6 +1236,7 @@
        |       \$\$\{[0-9A-Z_a-z]+\}   # shell variable in braces
        |       \$\$\(                  # POSIX-style backticks replacement
        |       [^\(\)'\"\\\s;&\|<>\#\`\$] # non-special character
+       |       \$\{[^\s\"'`]+          # HACK: nested make(1) variables
        )+ | ;;? | &&? | \|\|? | \( | \) | <<? | >>? | \#.*)"sx;
 my $regex_varname              = qr"[-*+.0-9A-Z_a-z{}\[]+";
 
@@ -2229,7 +2230,7 @@
        $state = SWST_PLAIN;
        while ($rest ne "") {
 
-               $opt_debug and $line->log_error("[checkline_mk_shellword] " . statename->[$state] . " ${rest}");
+               $opt_debug and $line->log_debug("[checkline_mk_shellword] " . statename->[$state] . " ${rest}");
 
                # make variables have the same syntax, no matter in which
                # state we are currently.
@@ -3706,7 +3707,7 @@
                log_warning($fname, NO_LINE_NUMBER, "Neither PLIST nor PLIST.common exist, and PLIST_SRC and NO_PKG_REGISTER are unset. Are you sure PLIST handling is ok?");
        }
 
-       if (exists($makevar->{"NO_CHECKSUM"})) {
+       if (exists($makevar->{"NO_CHECKSUM"}) && is_emptydir("${current_dir}/${patchdir}")) {
                if (-f "${current_dir}/${distinfo_file}") {
                        log_warning("${current_dir}/${distinfo_file}", NO_LINE_NUMBER, "This file should not exist if NO_CHECKSUM is set.");
                }



Home | Main Index | Thread Index | Old Index