pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Distinguish between Pathnames a...
details: https://anonhg.NetBSD.org/pkgsrc/rev/4e1d05f4dc48
branches: trunk
changeset: 508365:4e1d05f4dc48
user: rillig <rillig%pkgsrc.org@localhost>
date: Sat Feb 18 14:13:32 2006 +0000
description:
Distinguish between Pathnames and Pathlists. The latter are lists of
pathnames, separated by a colon.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diffs (57 lines):
diff -r 0f96c1b62ba6 -r 4e1d05f4dc48 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sat Feb 18 14:12:49 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sat Feb 18 14:13:32 2006 +0000
@@ -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 @@
} 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 @@
$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 @@
$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 @@
: ($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"
Home |
Main Index |
Thread Index |
Old Index