pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files - Fixed path handling when ${PK...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f9a07be99d73
branches: trunk
changeset: 508722:f9a07be99d73
user: rillig <rillig%pkgsrc.org@localhost>
date: Fri Feb 24 14:24:42 2006 +0000
description:
- Fixed path handling when ${PKGSRCDIR} appears in Makefiles.
- Be stricter when checking for Identifiers (e.g. BUILD_TARGET).
Variable assignments are not allowed here and should go to
BUILD_MAKE_FLAGS.
- Check for quoting in assignments to list variables.
- gettext-lib/builtin.mk must not be included directly.
- .orig files should not be in the PLIST.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
diffs (74 lines):
diff -r c64db6a20a95 -r f9a07be99d73 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Fri Feb 24 14:15:12 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Fri Feb 24 14:24:42 2006 +0000
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.530 2006/02/19 21:28:35 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.531 2006/02/24 14:24:42 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -1886,7 +1886,7 @@
sub resolve_relative_path($$) {
my ($relpath, $adjust_depth) = @_;
- $relpath =~ s,\$\{PKGSRCDIR\},$current_dir/$pkgsrcdir,;
+ $relpath =~ s,\$\{PKGSRCDIR\},$pkgsrcdir,;
$relpath =~ s,\$\{\.CURDIR\},.,;
$relpath =~ s,\$\{PHPPKGSRCDIR\},../../lang/php5,;
$relpath =~ s,\$\{SUSE_DIR_PREFIX\},suse91,;
@@ -2932,7 +2932,12 @@
} elsif ($type eq "Identifier") {
if ($value ne $value_novar) {
#$line->log_warning("Identifiers should be given directly.");
- } elsif ($value !~ qr"^[+\-.0-9A-Z_a-z]+$") {
+ }
+ if ($value_novar =~ qr"^[+\-.0-9A-Z_a-z]+$") {
+ # Fine.
+ } elsif ($value ne "" && $value_novar eq "") {
+ # Don't warn here.
+ } else {
$line->log_warning("Invalid identifier \"${value}\".");
}
@@ -3091,7 +3096,9 @@
checkline_mk_shellcmd($line, $value);
} elsif ($type eq "ShellWord") {
- checkline_mk_shellword($line, $value, true);
+ if (!$list_context) {
+ checkline_mk_shellword($line, $value, true);
+ }
} elsif ($type eq "Stage") {
if ($value !~ qr"^(?:pre|do|post)-(?:extract|patch|configure|build|install)$") {
@@ -3303,6 +3310,9 @@
foreach my $word (@words) {
if (defined($element_type)) {
checkline_mk_vartype_basic($line, $varname, $element_type, $op, $word, $comment, true);
+ if (!$internal_list) {
+ checkline_mk_shellword($line, $word, true);
+ }
}
}
@@ -3621,6 +3631,9 @@
if ($includefile =~ qr"/x11-links/buildlink3\.mk$") {
$line->log_error("${includefile} must not be included directly. Include \"../../mk/x11.buildlink3.mk\" instead.");
}
+ if ($includefile =~ qr"/gettext-lib/builtin\.mk$") {
+ $line->log_error("${includefile} must not be included directly. Include \"../../devel/gettext-lib/buildlink3.mk\" instead.");
+ }
} elsif ($text =~ regex_mk_cond) {
my ($directive, $args) = ($1, $2);
@@ -4445,6 +4458,9 @@
if ($text =~ qr"/CVS/") {
$line->log_warning("CVS files should not be in the PLIST.");
}
+ if ($text =~ qr"\.orig$") {
+ $line->log_warning(".orig files should not be in the PLIST.");
+ }
} else {
$line->log_error("Unknown line type.");
Home |
Main Index |
Thread Index |
Old Index