pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files The shell command lines in Make...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3af09bbf0c7d
branches: trunk
changeset: 516814:3af09bbf0c7d
user: rillig <rillig%pkgsrc.org@localhost>
date: Fri Jul 28 17:10:12 2006 +0000
description:
The shell command lines in Makefiles are split into words, which are then
saved in the line as extra fields.
When checking for absolute pathnames in "other" files, allow the form
${variable}/bin, as seen in www/apache2/patches/patch-ad. Noticed by
Matthias Scheler.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diffs (33 lines):
diff -r b5e51ec5b165 -r 3af09bbf0c7d pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Fri Jul 28 14:22:29 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Fri Jul 28 17:10:12 2006 +0000
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.664 2006/07/27 16:13:51 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.665 2006/07/28 17:10:12 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -3256,6 +3256,12 @@
$line->set("is_shellcmd", true);
$line->set("shellcmd", $shellcmd);
+ my ($shellwords, $rest) = match_all($shellcmd, $regex_shellword);
+ $line->set("shellwords", $shellwords);
+ if ($rest !~ qr"^\s*$") {
+ $line->set("shellwords_rest", $rest);
+ }
+
} elsif ($text =~ regex_mk_comment) {
my ($comment) = @_;
@@ -3624,6 +3630,9 @@
if ($before =~ qr"\@$") {
# Something like @PREFIX@/bin
+ } elsif ($before =~ qr"\}$") {
+ # Something like ${prefix}/bin
+
} else {
checkword_absolute_pathname($line, $path);
}
Home |
Main Index |
Thread Index |
Old Index