summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorhubertf <hubertf@pkgsrc.org>2000-04-05 23:34:42 +0000
committerhubertf <hubertf@pkgsrc.org>2000-04-05 23:34:42 +0000
commit243c686459953aac3aa22fd9892b8025bac8a6a3 (patch)
treee091d86f7c8c343b617eab8d9a13f0753c3bc0a2 /pkgtools
parent216ea08c9f5c4a4699aef2b739790833491497cc (diff)
downloadpkgsrc-243c686459953aac3aa22fd9892b8025bac8a6a3.tar.gz
* Only warn that EXTRACT_SUFX is superfluous if DISTFILES is set AND
EXTRACT_SUFX is set to (only) .tar.gz. Fixes PRs 9771 and 9635 * use getopt() for option parsing - "pkgling -abc" will work now.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/Makefile4
-rw-r--r--pkgtools/pkglint/files/pkglint.pl41
2 files changed, 20 insertions, 25 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index cbb3f14ad8b..be838caf4ad 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.46 2000/03/16 14:22:02 wiz Exp $
+# $NetBSD: Makefile,v 1.47 2000/04/05 23:34:42 hubertf Exp $
#
-DISTNAME= pkglint-2.05
+DISTNAME= pkglint-2.06
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index c625f94ab41..43b29caf8f5 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -12,13 +12,16 @@
# 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.28 2000/03/16 14:22:03 wiz Exp $
+# $NetBSD: pkglint.pl,v 1.29 2000/04/05 23:34:43 hubertf Exp $
#
# This version contains some changes necessary for NetBSD packages
# done by Hubert Feyrer <hubertf@netbsd.org> and
# Thorsten Frueauf <frueauf@netbsd.org>
#
+use Getopt::Std;
+
+
$err = $warn = 0;
$extrafile = $parenwarn = $committer = $verbose = $newport = 0;
$contblank = 1;
@@ -35,10 +38,9 @@ $manstrict = 0;
$manchapters = '123456789ln';
$localbase = "/usr/local";
-#select(STDERR);
-while (@ARGV > 0) {
- $_ = shift;
- /^-h/ && do {
+getopts('habcNB:v');
+
+if ($opt_h) {
($prog) = ($0 =~ /([^\/]+)$/);
print STDERR <<EOF;
usage: $prog [-abcvN] [-B#] [package_directory]
@@ -50,23 +52,16 @@ usage: $prog [-abcvN] [-B#] [package_directory]
-B# allow # contiguous blank lines (default: $contblank line)
EOF
exit 0;
- };
- /^-a/ && do {$extrafile = 1; next;};
- /^-b/ && do {$parenwarn = 1; next;};
- /^-c/ && do {$committer = 1; next;};
- /^-v/ && do {$verbose = 1; next;};
- /^-N/ && do {$newport = 1; next;};
- /^-B(\d+)$/ && do { $contblank = $1; next; };
- @ARGV > 0 && /^-B$/ && do {
- $contblank = shift;
- if ($contblank !~ /^\d+$/) {
- print STDERR "FATAL: -B must come with number.\n";
- exit 1;
- }
- next;
- };
- $portdir = $_;
-}
+};
+$extrafile = 1 if $opt_a;
+$parenwarn = 1 if $opt_b;
+$committer = 1 if $opt_c;
+$verbose = 1 if $opt_v;
+$newport = 1 if $opt_N;
+$contblank = $opt_B if $opt_B;
+
+$portdir = shift || ".";
+
# OS dependent configs
# os portsdir rcsid mplist ldcfg plist-rcsid mancompresss strict localbase
@@ -885,7 +880,7 @@ EOF
# check bogus EXTRACT_SUFX.
if ($extractsufx ne '') {
print "OK: seen EXTRACT_SUFX, checking value.\n" if ($verbose);
- if ($distfiles ne '') {
+ if ($distfiles ne '' && ($extractsufx eq '.tar.gz')) {
&perror("WARN: no need to define EXTRACT_SUFX if ".
"DISTFILES is defined.");
}