diff options
author | abs <abs> | 1999-08-01 18:34:40 +0000 |
---|---|---|
committer | abs <abs> | 1999-08-01 18:34:40 +0000 |
commit | a88c7058f7587c1ce98c21cd09c6c75b2d940988 (patch) | |
tree | fe6bf655c8e0c07e3228339ca63c1bc8dc1f6b62 /pkgtools | |
parent | a280384b60fdc45cbdd3948e6e6a889fa451bf13 (diff) | |
download | pkgsrc-a88c7058f7587c1ce98c21cd09c6c75b2d940988.tar.gz |
Add -P flag to lintpkgsrc to override PKGSRCDIR
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/pkglint/files/lintpkgsrc.1 | 7 | ||||
-rwxr-xr-x | pkgtools/pkglint/files/lintpkgsrc.pl | 13 |
3 files changed, 16 insertions, 8 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index d51fbe20d91..2be4d60aaf2 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.13 1999/07/08 09:46:08 agc Exp $ +# $NetBSD: Makefile,v 1.14 1999/08/01 18:34:40 abs Exp $ # -DISTNAME= pkglint-1.73 +DISTNAME= pkglint-1.74 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkglint/files/lintpkgsrc.1 b/pkgtools/pkglint/files/lintpkgsrc.1 index a93064b2954..cc3f1d3038c 100644 --- a/pkgtools/pkglint/files/lintpkgsrc.1 +++ b/pkgtools/pkglint/files/lintpkgsrc.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: lintpkgsrc.1,v 1.3 1999/06/24 23:40:13 abs Exp $ +.\" $NetBSD: lintpkgsrc.1,v 1.4 1999/08/01 18:34:41 abs Exp $ .\" .\" Copyright (c) 1999 by David Brownlee (abs@netbsd.org) .\" Absolutely no warranty. @@ -11,6 +11,7 @@ .Sh SYNOPSIS .Nm .Op Fl dhilmor +.Op Fl P Ar pkgsrcdir .Sh DESCRIPTION .Nm tries to verify the entire contents of the pkgsrc tree. @@ -21,6 +22,10 @@ Note that it does NOT implement complete Makefile parser. .Pp .Sy Options .Bl -tag -width Fl +.It Fl P Ar pkgsrcdir +Set pkgsrcdir - otherwise +.Pa /etc/mk.conf is parsed for +.Em PKGSRCDIR . .It Fl h Basic help and usage. .It Fl d diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl index 9a78c2e9418..bb8bf362c2c 100755 --- a/pkgtools/pkglint/files/lintpkgsrc.pl +++ b/pkgtools/pkglint/files/lintpkgsrc.pl @@ -1,8 +1,8 @@ #!/usr/bin/env perl -# $NetBSD: lintpkgsrc.pl,v 1.4 1999/06/24 23:40:13 abs Exp $ +# $NetBSD: lintpkgsrc.pl,v 1.5 1999/08/01 18:34:41 abs Exp $ -# (Somewhat quickly) Written by David Brownlee <abs@anim.dreamworks.com>. +# (Somewhat quickly) Written by David Brownlee <abs@netbsd.org>. # Caveats: # The 'Makefile parsing' algorithym used to obtain package versions # and DEPENDS information is geared towards speed rather than perfection. @@ -14,10 +14,10 @@ require 'getopts.pl'; $^W=1; use strict; use File::Find; -use vars qw($opt_d $opt_h $opt_i $opt_l $opt_m $opt_o $opt_p $opt_r); +use vars qw($opt_P $opt_d $opt_h $opt_i $opt_l $opt_m $opt_o $opt_p $opt_r); my(%pkg2dir,@oldprebuiltpackages); -if (! &Getopts('dhilmopr') || $opt_h || +if (! &Getopts('P:dhilmopr') || $opt_h || ! ( defined($opt_d) || defined($opt_i) || defined($opt_l) || defined($opt_m) || defined($opt_o) || defined($opt_p) || defined($opt_r) )) @@ -30,7 +30,10 @@ $|=1; my($pkgsrcdir,$pkglint_flags); $pkglint_flags='-a -b -c -v'; - $pkgsrcdir=&set_pkgsrcdir; # Parse /etc/mk.conf (if present) for PKGSRCDIR + if ($opt_P) + { $pkgsrcdir=$opt_P; } # Check /etc/mk.conf for PKGSRCDIR + else + { $pkgsrcdir=&set_pkgsrcdir; } # Check /etc/mk.conf for PKGSRCDIR if ($opt_r && !$opt_o && !$opt_m && !$opt_p) { $opt_o=$opt_m=$opt_p=1; } |