summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint
diff options
context:
space:
mode:
authorrillig <rillig>2006-02-18 14:13:32 +0000
committerrillig <rillig>2006-02-18 14:13:32 +0000
commite1b2442e1372dd820444a77caeaeeaf5ae94e4f7 (patch)
tree6d3eb2db4247b58768414fc0941c30fcedcf6c6f /pkgtools/pkglint
parent2177ca53b784dad77df77366b0ccff58cb8bd8bf (diff)
downloadpkgsrc-e1b2442e1372dd820444a77caeaeeaf5ae94e4f7.tar.gz
Distinguish between Pathnames and Pathlists. The latter are lists of
pathnames, separated by a colon.
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl21
1 files changed, 16 insertions, 5 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 29dbffe8fe7..8163817504d 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.523 2006/02/18 11:39:46 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.524 2006/02/18 14:13:32 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -2901,6 +2901,10 @@ sub checkline_mk_vartype_basic($$$$$$) {
} elsif ($value =~ qr"^(?:-static)$") {
# Assume that the wrapper framework catches these.
+ } elsif ($value =~ qr"^(-Wl,(?:-R|-rpath|--rpath))") {
+ my ($rpath_flag) = ($1);
+ $line->log_warning("Please use \${COMPILER_RPATH_FLAG} instead of ${rpath_flag}.");
+
} elsif ($value =~ qr"^-.*") {
$line->log_warning("Unknown linker flag \"${value}\".");
@@ -2952,9 +2956,11 @@ sub checkline_mk_vartype_basic($$$$$$) {
$line->log_error("\"${value}\" is not a valid option name.");
}
- } elsif ($type eq "Pathname") {
- if ($value_novar !~ qr"^[-0-9A-Za-z._~+%/]*$") {
- $line->log_warning("\"${value}\" is not a valid pathname.");
+ } elsif ($type eq "Pathlist") {
+ my (@paths) = split(qr":", $value_novar);
+
+ foreach my $p (@paths) {
+ checkline_mk_vartype_basic($line, $varname, "Pathname", $op, $p, $comment);
}
} elsif ($type eq "Pathmask") {
@@ -2962,6 +2968,11 @@ sub checkline_mk_vartype_basic($$$$$$) {
$line->log_warning("\"${value}\" is not a valid pathname mask.");
}
+ } elsif ($type eq "Pathname") {
+ if ($value_novar !~ qr"^[-0-9A-Za-z._~+%/]*$") {
+ $line->log_warning("\"${value}\" is not a valid pathname.");
+ }
+
} elsif ($type eq "Perl5Packlist") {
if ($value ne $value_novar) {
$line->log_warning("${varname} should not depend on other variables.");
@@ -3194,7 +3205,7 @@ sub checkline_mk_vartype($$$$$) {
: ($varname =~ qr"DIR$") ? "Pathname"
: ($varname =~ qr"FILES$") ? "List of Pathmask"
: ($varname =~ qr"FILE$") ? "Pathname"
- : ($varname =~ qr"PATH$") ? "Pathname"
+ : ($varname =~ qr"PATH$") ? "Pathlist"
: ($varname =~ qr"PATHS$") ? "List of Pathname"
: ($varname =~ qr"_USER$") ? "UserGroupName"
: ($varname =~ qr"_GROUP$") ? "UserGroupName"