diff options
Diffstat (limited to 'pkgtools/pkglint/files')
-rw-r--r-- | pkgtools/pkglint/files/lintpkgsrc.1 | 7 | ||||
-rwxr-xr-x | pkgtools/pkglint/files/lintpkgsrc.pl | 14 |
2 files changed, 15 insertions, 6 deletions
diff --git a/pkgtools/pkglint/files/lintpkgsrc.1 b/pkgtools/pkglint/files/lintpkgsrc.1 index 1249b75a32f..2945343faa1 100644 --- a/pkgtools/pkglint/files/lintpkgsrc.1 +++ b/pkgtools/pkglint/files/lintpkgsrc.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: lintpkgsrc.1,v 1.6 1999/12/22 21:04:17 abs Exp $ +.\" $NetBSD: lintpkgsrc.1,v 1.7 1999/12/22 21:37:58 abs Exp $ .\" .\" Copyright (c) 1999 by David Brownlee (abs@netbsd.org) .\" Absolutely no warranty. @@ -11,8 +11,9 @@ .Sh SYNOPSIS .Nm .Op Fl Rdhilmor -.Op Fl P Ar pkgsrcdir .Op Fl D Ar paths +.Op Fl K Ar binpkgdir +.Op Fl P Ar pkgsrcdir .Sh DESCRIPTION .Nm tries to verify the entire contents of the pkgsrc tree. @@ -25,6 +26,8 @@ Note that it does NOT implement complete Makefile parser. .Bl -tag -width xxxxxxxxxxxx .It Fl D Ar paths Parse Makefiles and output contents (Useful for debugging). +.It Fl K Ar binpkgdir +Set basedir for binary packages, otherwise PKGSRCDIR/packages is used. .It Fl P Ar pkgsrcdir Set pkgsrcdir - otherwise .Pa /etc/mk.conf is parsed for diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl index 10a7732880f..38da3803722 100755 --- a/pkgtools/pkglint/files/lintpkgsrc.pl +++ b/pkgtools/pkglint/files/lintpkgsrc.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl -# $NetBSD: lintpkgsrc.pl,v 1.12 1999/12/22 21:04:18 abs Exp $ +# $NetBSD: lintpkgsrc.pl,v 1.13 1999/12/22 21:37:58 abs Exp $ # Written by David Brownlee <abs@netbsd.org>. # @@ -27,7 +27,7 @@ my( $pkgsrcdir, # Base of pkgsrc tree $ENV{PATH} .= ':/usr/sbin'; -if (! &getopts('DP:Rdhilmopr', \%opt) || $opt{'h'} || +if (! &getopts('DK:P:Rdhilmopr', \%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'}) )) @@ -79,9 +79,15 @@ if ($opt{'D'}) # if ($opt{'p'} || $opt{'R'}) { + my($binpkgdir); + if (!%pkgver2dir) { &scan_pkgsrc_makefiles($pkgsrcdir); } - find(\&check_prebuilt_packages, "$pkgsrcdir/packages"); + if ($opt{'K'}) + { $binpkgdir = $opt{'K'}; } + else + { $binpkgdir = "$pkgsrcdir/packages"; } + find(\&check_prebuilt_packages, $binpkgdir); if ($opt{'r'}) { &verbose("Unlinking 'old' prebuiltpackages\n"); @@ -702,10 +708,10 @@ opts: -r : Remove any 'bad' distfiles (Without -m, -o, or -p, implies all). -P path : Set PKGSRCDIR + -K path : Set basedir for prebuild packages (default PKGSRCDIR/packages) -D [paths] : Parse Makefiles and output contents (For debugging) If pkgsrc is not in /usr/pkgsrc, set PKGSRCDIR in /etc/mk.conf -Prebuilt packages are assumed to be an any subdir of PKGSRCDIR/packages/ "; exit; } |