diff options
author | rillig <rillig@pkgsrc.org> | 2005-07-20 21:04:16 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-07-20 21:04:16 +0000 |
commit | 634fbab5eb897fa9a2ee2ef451769658c97a73af (patch) | |
tree | afc7af8448dac69e9639590750325ceefff2de5d /pkgtools | |
parent | 75f0ee08198b74ef6c06c1140750dae0823fb509 (diff) | |
download | pkgsrc-634fbab5eb897fa9a2ee2ef451769658c97a73af.tar.gz |
Don't show warnings for tool names that are enclosed in single quotes.
Replace ${PHPPKGSRCDIR} with ../../lang/php5 when expanding Makefile
variables. Show a warning if Makefile variables contain unresolved
substitutions after expanding them. Fixed a newly introduced bug that
prevented bsd.sites.mk from being found.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index b3ed4c1a6e8..75098be295d 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -11,7 +11,7 @@ # Freely redistributable. Absolutely no warranty. # # From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp -# $NetBSD: pkglint.pl,v 1.210 2005/07/20 18:20:27 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.211 2005/07/20 21:04:16 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -1244,7 +1244,8 @@ sub checklines_direct_tools($) { USE_TOOLS); my @ok_shellcmds = ( qr"(?:\./Build|\$\{JAM_COMMAND\})\s+(?:install|test)", - qr"\"[^\"]*${regex_tools}[^\"]*\""); + qr"\"[^\"]*${regex_tools}[^\"]*\"", + qr"\'[^\']*${regex_tools}[^\']*\'"); my %toolvar = (); foreach my $tool (@tools) { @@ -1314,9 +1315,15 @@ sub expand_variable($$$) { } $value =~ s,\$\{\.CURDIR\},.,g; $value =~ s,\$\{PKGSRCDIR\},../..,g; + $value =~ s,\$\{PHPPKGSRCDIR\},../../lang/php5,g; if (defined($pkgdir)) { $value =~ s,\$\{PKGDIR\},$pkgdir,g; } + if ($value =~ qr"\$") { + log_warning(NO_FILE, NO_LINE_NUMBER, "The variable ${varname} could not be resolved completely."); + log_warning(NO_FILE, NO_LINE_NUMBER, "Its value would be \"${value}\"---using \"${default_value}\" instead."); + $value = $default_value; + } return $value; } @@ -1526,7 +1533,7 @@ sub checkfile_Makefile($$) { $opt_warn_vague && log_error(NO_FILE, NO_LINE_NUMBER, "URL \"$i\" contains ". "extra \":\"."); } - check_predefined_sites($dir, $i); + check_predefined_sites("$dir/../..", $i); } else { log_info(NO_FILE, NO_LINE_NUMBER, "non-URL \"$i\" ok."); } |