summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint
diff options
context:
space:
mode:
authorrillig <rillig>2006-06-06 11:39:25 +0000
committerrillig <rillig>2006-06-06 11:39:25 +0000
commit1bb2b74e2e1c10c96fb2c1c7df16de5172c96b09 (patch)
tree761a6d7521da9aeaf1386b0855ae8ec2e89d3b1f /pkgtools/pkglint
parent07f49bb6fe09e7cd98ac31cba1019b5bf3e9a891 (diff)
downloadpkgsrc-1bb2b74e2e1c10c96fb2c1c7df16de5172c96b09.tar.gz
A variable that appears as a whole shell word may either be used as a
list of shell words, or sometimes as a single shell word. Compare: ${LD} ${LDFLAGS} and ./configure -libs ${LDFLAGS:Q}. So in this case, the :Q operator cannot be checked reliably.
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index b31dbf976c0..e59625e7325 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.606 2006/06/06 09:56:22 seb Exp $
+# $NetBSD: pkglint.pl,v 1.607 2006/06/06 11:39:25 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -1800,7 +1800,7 @@ sub parse_acls($$) {
}
$acls = [];
- while ($acltext =~ s,^(?:\$(\w+)|([\w.*]+|_):([adpsu]*))(?:\,\s*|$),,) {
+ while ($acltext =~ s,^(?:\$([\w_]+)|([\w.*]+|_):([adpsu]*))(?:\,\s*|$),,) {
my ($acldef, $subject, $perms) = ($1, $2, $3);
if (defined($acldef)) {
@@ -2675,9 +2675,13 @@ sub variable_needs_quoting($$$) {
return true;
}
- # Assigning lists to lists does not require any quoting.
+ # Assigning lists to lists does not require any quoting, though
+ # there may be cases like "CONFIGURE_ARGS+= -libs ${LDFLAGS:Q}"
+ # where quoting is necessary. So let's hope that no developer
+ # ever makes the mistake of using :Q when appending a list to
+ # a list.
if ($want_list && $have_list) {
- return false;
+ return doesnt_matter;
}
# Appending elements to a list requires quoting, as well as