summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-06-06 11:39:25 +0000
committerrillig <rillig@pkgsrc.org>2006-06-06 11:39:25 +0000
commit1e457582dea332128d5d9f10635dbd765bc5e2ca (patch)
tree761a6d7521da9aeaf1386b0855ae8ec2e89d3b1f /pkgtools
parent281a32dde2202c4aaaf78b8462e8c0ceab457673 (diff)
downloadpkgsrc-1e457582dea332128d5d9f10635dbd765bc5e2ca.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')
-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