diff options
author | dmcmahill <dmcmahill@pkgsrc.org> | 2000-05-29 19:44:27 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill@pkgsrc.org> | 2000-05-29 19:44:27 +0000 |
commit | 4397a6878e373aa77c24e78f5d30ed5ca9a513b7 (patch) | |
tree | 85d47991ce927238d61aef2d9ccd8e6b17616f16 /pkgtools | |
parent | 065b712b9f3ba766fe2e3c42a9f6fa24b5a58c20 (diff) | |
download | pkgsrc-4397a6878e373aa77c24e78f5d30ed5ca9a513b7.tar.gz |
- add "-M path" option to allow specifying a distfiles directory to handle cases
where PKGSRC/distfiles isn't the correct location (like on ftp.netbsd.org).
- document the option.
- bump minor version number.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/pkglint/files/lintpkgsrc.1 | 4 | ||||
-rwxr-xr-x | pkgtools/pkglint/files/lintpkgsrc.pl | 20 |
3 files changed, 19 insertions, 9 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index 5c03d5c3bad..6f775407d43 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.48 2000/05/16 11:41:07 abs Exp $ +# $NetBSD: Makefile,v 1.49 2000/05/29 19:44:27 dmcmahill Exp $ # -DISTNAME= pkglint-2.07 +DISTNAME= pkglint-2.08 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkglint/files/lintpkgsrc.1 b/pkgtools/pkglint/files/lintpkgsrc.1 index f54e41cbc6a..79efef633e1 100644 --- a/pkgtools/pkglint/files/lintpkgsrc.1 +++ b/pkgtools/pkglint/files/lintpkgsrc.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: lintpkgsrc.1,v 1.9 2000/01/19 13:59:22 abs Exp $ +.\" $NetBSD: lintpkgsrc.1,v 1.10 2000/05/29 19:44:28 dmcmahill Exp $ .\" .\" Copyright (c) 1999 by David Brownlee (abs@netbsd.org) .\" Absolutely no warranty. @@ -30,6 +30,8 @@ Parse Makefiles and output contents (Useful for debugging). Set basedir for binary packages, otherwise PKGSRCDIR/packages is used. .It Fl L List the filenames of Makefiles as they are parsed (for debugging). +.It Fl M Ar distdir +Set basedir for distfiles, otherwise PKGSRCDIR/distfiles is used. .It Fl P Ar pkgsrcdir Set pkgsrcdir - otherwise .Pa /etc/mk.conf diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl index 66211506ca7..1353a943fdf 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.24 2000/05/16 11:41:08 abs Exp $ +# $NetBSD: lintpkgsrc.pl,v 1.25 2000/05/29 19:44:28 dmcmahill Exp $ # Written by David Brownlee <abs@netbsd.org>. # @@ -18,6 +18,7 @@ use strict; use Getopt::Std; use File::Find; my( $pkgsrcdir, # Base of pkgsrc tree + $pkgdistdir, # Distfiles directory %pkgver2dir, # Map package-version to category/pkgname %pkg2ver, # Map pkgname to version %pkgrestricted, # RESTRICTED/LICENCE packages, by pkgname @@ -29,7 +30,7 @@ my( $pkgsrcdir, # Base of pkgsrc tree $ENV{PATH} .= ':/usr/sbin'; -if (! &getopts('DK:LP:Rdhilmopru', \%opt) || $opt{'h'} || +if (! &getopts('DK:LM:P:Rdhilmopru', \%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{'u'}) || defined($opt{'D'}) || @@ -63,6 +64,12 @@ if ($opt{'D'}) else { $pkgsrcdir = &set_pkgsrcdir; } # Check /etc/mk.conf for PKGSRCDIR + if ($opt{'M'}) + { $pkgdistdir = $opt{'M'}; } # override distfile dir + else + { $pkgdistdir = "$pkgsrcdir/distfiles"; } # default + + if ($opt{'r'} && !$opt{'o'} && !$opt{'m'} && !$opt{'p'}) { $opt{'o'} = $opt{'m'} = $opt{'p'} = 1; } if ($opt{'o'} || $opt{'m'}) @@ -73,7 +80,7 @@ if ($opt{'D'}) $opt{'m'}); if ($opt{'r'}) { - &safe_chdir("$pkgsrcdir/distfiles"); + &safe_chdir("$pkgdistdir"); &verbose("Unlinking 'bad' distfiles\n"); foreach (@baddist) { unlink($_); } @@ -763,7 +770,7 @@ sub scan_pkgsrc_distfiles_vs_md5 } &verbose(" ($numpkg packages)\n"); - foreach $file (&listdir("$pkgsrcdir/distfiles")) + foreach $file (&listdir("$pkgdistdir")) { if (!defined($distfiles{$file})) { push(@bad_distfiles, $file); } @@ -773,7 +780,7 @@ sub scan_pkgsrc_distfiles_vs_md5 if ($check_unref && @bad_distfiles) { &verbose(scalar(@bad_distfiles), - " unreferenced file(s) in '$pkgsrcdir/distfiles':\n"); + " unreferenced file(s) in '$pkgdistdir':\n"); print join("\n", sort @bad_distfiles), "\n"; } if ($check_md5) @@ -782,7 +789,7 @@ sub scan_pkgsrc_distfiles_vs_md5 { &verbose(@distwarn); } &verbose("md5 mismatches\n"); @distfiles = sort @distfiles; - &safe_chdir("$pkgsrcdir/distfiles"); + &safe_chdir("$pkgdistdir"); open(MD5, "md5 @distfiles|") || &fail("Unable to run md5: $!"); while (<MD5>) { @@ -836,6 +843,7 @@ opts: -L : List each Makefile when scanned -P path : Set PKGSRCDIR -K path : Set basedir for prebuild packages (default PKGSRCDIR/packages) + -M path : Set basedir for distfiles (default PKGSRCDIR/distfiles) -D [paths] : Parse Makefiles and output contents (For debugging) If pkgsrc is not in /usr/pkgsrc, set PKGSRCDIR in /etc/mk.conf |