summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2006-10-17 21:42:46 +0000
committerrillig <rillig>2006-10-17 21:42:46 +0000
commit5f195c764edfd0d7ec76b773ceed706cca90fd34 (patch)
tree07345f00b488517639b7cab8cb80edd43066ae17 /pkgtools
parent9d6875364b9ff27cd05f00e12fae5b68fa72cff2 (diff)
downloadpkgsrc-5f195c764edfd0d7ec76b773ceed706cca90fd34.tar.gz
The absolute pathname /bin/sh is allowed, despite the Solaris /bin/sh.
The WRKSRC variable (among others) is checked to consist of ony one word. The url2pkg tool had created lines like WRKSRC= ${WRKDIR}/Makefile PLIST distinfo in the past, which happened to work in most cases up to now, but really shouldn't.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 3319f48adb9..f7b58a9f7c8 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.680 2006/10/07 07:57:04 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.681 2006/10/17 21:42:46 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -3514,6 +3514,10 @@ sub checkword_absolute_pathname($$) {
if ($word =~ qr"^/dev/(?:null|tty|zero)$") {
# These are defined by POSIX.
+ } elsif ($word eq "/bin/sh") {
+ # This is usually correct, although on Solaris, it's pretty
+ # feature-crippled.
+
} elsif ($word !~ qr"/(?:[a-z]|\$[({])") {
# Assume that all pathnames start with a lowercase letter.
@@ -5312,6 +5316,7 @@ sub checkline_mk_vartype_basic($$$$$$$$) {
}
} elsif ($type eq "WrkdirSubdirectory") {
+ checkline_mk_vartype_basic($line, $varname, "Pathname", $op, $value, $comment, $list_context, $is_guessed);
if ($value eq "\${WRKDIR}") {
# Fine.
} else {