diff options
author | rillig <rillig> | 2006-06-06 11:39:25 +0000 |
---|---|---|
committer | rillig <rillig> | 2006-06-06 11:39:25 +0000 |
commit | 79ccb1019d5be79888e8c81811d7d91a0af8bba6 (patch) | |
tree | 761a6d7521da9aeaf1386b0855ae8ec2e89d3b1f /pkgtools | |
parent | ee91964d28835a6a6126ee4a3100ee78741a58c2 (diff) | |
download | pkgsrc-79ccb1019d5be79888e8c81811d7d91a0af8bba6.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.pl | 12 |
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 |