pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Don't be too strict to the "wip...
details: https://anonhg.NetBSD.org/pkgsrc/rev/6df2d12afad4
branches: trunk
changeset: 497891:6df2d12afad4
user: rillig <rillig%pkgsrc.org@localhost>
date: Sat Aug 06 21:08:05 2005 +0000
description:
Don't be too strict to the "wip" category Makefile. It may have a
different second line and additional targets after the SUBDIR entries.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (50 lines):
diff -r 4c4426355104 -r 6df2d12afad4 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sat Aug 06 20:45:18 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sat Aug 06 21:08:05 2005 +0000
@@ -11,7 +11,7 @@
# Freely redistributable. Absolutely no warranty.
#
# From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# $NetBSD: pkglint.pl,v 1.231 2005/08/06 20:32:35 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.232 2005/08/06 21:08:05 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -2028,19 +2028,22 @@
my ($lines);
my (@makefile_subdirs) = ();
my (@filesys_subdirs) = ();
+ my ($is_wip);
if (!($lines = load_file($fname))) {
log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
return;
}
+ $is_wip = (basename(Cwd::abs_path($dir)) eq "wip");
+
if (@{$lines} < 8) {
log_error($fname, NO_LINE_NUMBER, "File too short.");
}
if (@{$lines} > 0) {
checkline_rcsid_regex($lines->[0], qr"#\s+", "# ");
}
- if (@{$lines} > 1 && $lines->[1]->text ne "#") {
+ if (@{$lines} > 1 && $lines->[1]->text ne "#" && !$is_wip) {
$lines->[1]->log_error("This line must contain a single #, nothing more.");
}
if (@{$lines} > 2 && $lines->[2]->text ne "") {
@@ -2082,7 +2085,13 @@
$last_subdir = $subdir;
push(@makefile_subdirs, $subdir);
+
} else {
+ # ignore the special case "wip", which defines its own "index" target.
+ if ($is_wip && $line->text eq "") {
+ last;
+ }
+
$line->log_error("SUBDIR+= line expected.");
}
}
Home |
Main Index |
Thread Index |
Old Index