Subject: lintpkgsrc change for distfile checks
To: None <tech-pkg@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: tech-pkg
Date: 01/02/2000 16:20:58
How does the following diff to lintpkgsrc look? At home, I
just fetch the pkgsrc directories I want - not the complete
pkgsrc tree. This means the category directories don't have
any Makefile's in them. I've added the "-s" option that
checks subdirectories directly. If there's no complaints
I'll commit this (better wording for the new option will
be accepted!).
Simon.
--
--- /usr/pkg/bin/lintpkgsrc Sun Jan 2 15:58:47 2000
+++ lintpkgsrc Sun Jan 2 16:17:35 2000
@@ -27,7 +27,7 @@
$ENV{PATH} .= ':/usr/sbin';
-if (! &getopts('DK:P:Rdhilmopr', \%opt) || $opt{'h'} ||
+if (! &getopts('DK:P:Rdhilmoprs', \%opt) || $opt{'h'} ||
! ( defined($opt{'d'}) || defined($opt{'i'}) || defined($opt{'l'}) ||
defined($opt{'m'}) || defined($opt{'o'}) || defined($opt{'p'}) ||
defined($opt{'r'}) || defined($opt{'D'}) || defined($opt{'R'}) ))
@@ -234,8 +234,9 @@
my(@categories);
opendir(BASE, $pkgsrcdir) || die("Unable to opendir($pkgsrcdir): $!");
- @categories = grep(substr($_, 0, 1) ne '.' && -f "$pkgsrcdir/$_/Makefile",
- readdir(BASE));
+ @categories = grep(substr($_, 0, 1) ne '.' &&
+ ($opt{'s'} || -f "$pkgsrcdir/$_/Makefile"),
+ readdir(BASE));
closedir(BASE);
@categories;
}
@@ -708,6 +709,7 @@
-o : List old/obsolete distfiles (not referenced by any md5).
-p : List old/obsolete prebuilt packages.
-r : Remove any 'bad' distfiles (Without -m, -o, or -p, implies all).
+ -s : Check subdirectories directly instead of Makefiles (with -m or -o).
-P path : Set PKGSRCDIR
-K path : Set basedir for prebuild packages (default PKGSRCDIR/packages)