summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-01-30 01:26:04 +0000
committerrillig <rillig@pkgsrc.org>2006-01-30 01:26:04 +0000
commit75562fa202d4938247adad25f7b2df015067c656 (patch)
tree025969e0d4d02bfd40e0a34c965ab4b289d79b97 /pkgtools
parent2bc4b9077968cd559065f3ab9ed26d566040bce1 (diff)
downloadpkgsrc-75562fa202d4938247adad25f7b2df015067c656.tar.gz
- 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 (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 7edf243374e..aea9b0545c7 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -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 @@ my $regex_shellword = qr"\s*(
| \$\$\{[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 @@ sub checkline_mk_shellword($$$) {
$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 @@ sub checkfile_package_Makefile($$$) {
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.");
}