summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2001-07-07 18:21:29 +0000
committerdmcmahill <dmcmahill>2001-07-07 18:21:29 +0000
commit89b851adb475cd0b12c8a7d31e9267d69682b9e9 (patch)
tree4f262e4bb4b22a315d46490b87c69892eeb12502 /pkgtools/pkglint
parent770228a7d97e990b685331bd1454ee744ebbd1d0 (diff)
downloadpkgsrc-89b851adb475cd0b12c8a7d31e9267d69682b9e9.tar.gz
add -O option to lintpkgsrc to report packages which have the
OSVERSION_SPECIFIC flag set. bump version to 3.04
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r--pkgtools/pkglint/Makefile4
-rw-r--r--pkgtools/pkglint/files/lintpkgsrc.110
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl22
3 files changed, 25 insertions, 11 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index b64d6fd3e1a..2cc332b74ba 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.104 2001/07/02 13:23:22 abs Exp $
+# $NetBSD: Makefile,v 1.105 2001/07/07 18:21:29 dmcmahill Exp $
#
-DISTNAME= pkglint-3.03
+DISTNAME= pkglint-3.04
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/lintpkgsrc.1 b/pkgtools/pkglint/files/lintpkgsrc.1
index 05f1cf12965..cbd239aa483 100644
--- a/pkgtools/pkglint/files/lintpkgsrc.1
+++ b/pkgtools/pkglint/files/lintpkgsrc.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: lintpkgsrc.1,v 1.18 2001/07/02 15:37:05 abs Exp $
+.\" $NetBSD: lintpkgsrc.1,v 1.19 2001/07/07 18:21:29 dmcmahill Exp $
.\"
.\" Copyright (c) 1999 by David Brownlee (abs@netbsd.org)
.\" Absolutely no warranty.
@@ -10,7 +10,7 @@
.Nd a verifier for the pkgsrc tree
.Sh SYNOPSIS
.Nm
-.Op Fl BDLRSVdhilmopru
+.Op Fl BDLORSVdhilmopru
.Op Fl K Ar PACKAGES
.Op Fl M Ar DISTDIR
.Op Fl P Ar PKGSRCDIR
@@ -55,6 +55,12 @@ Which would be an alternative to -K.
List the filenames of Makefiles as they are parsed (for debugging).
.It Fl M Ar DISTDIR
Set directory for distfiles, defaults to PKGSRCDIR/distfiles.
+.It Fl O
+Report any binary packages in any subdirs of
+.Em PACKAGES ,
+for whom the source Makefile lists
+.Em OSVERSION_SPECIFIC .
+This is intended to help those making binary packages available for ftp.
.It Fl P Ar PKGSRCDIR
Set base of pkgsrc tree, normally set from
.Pa /etc/mk.conf
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl
index 1bd7de79054..41a4f78fc8f 100755
--- a/pkgtools/pkglint/files/lintpkgsrc.pl
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl
@@ -1,6 +1,6 @@
#!@PREFIX@/bin/perl
-# $NetBSD: lintpkgsrc.pl,v 1.54 2001/06/21 15:53:54 abs Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.55 2001/07/07 18:21:29 dmcmahill Exp $
# Written by David Brownlee <abs@netbsd.org>.
#
@@ -27,12 +27,12 @@ my( %pkg, # {$ver} ->{restricted} ->{dir} ->{BROKEN}
$ENV{PATH} .= ':/usr/sbin';
-if (! &getopts('BDK:LM:P:RSVdg:hilmopru', \%opt) || $opt{'h'} ||
+if (! &getopts('BDK:LM:OP:RSVdg:hilmopru', \%opt) || $opt{'h'} ||
! ( defined($opt{'d'}) || defined($opt{'g'}) || defined($opt{'i'}) ||
defined($opt{'l'}) || defined($opt{'m'}) || defined($opt{'o'}) ||
defined($opt{'p'}) || defined($opt{'r'}) || defined($opt{'u'}) ||
defined($opt{'B'}) || defined($opt{'D'}) || defined($opt{'R'}) ||
- defined($opt{'S'}) || defined($opt{'V'}) ))
+ defined($opt{'O'}) || defined($opt{'S'}) || defined($opt{'V'}) ))
{ &usage_and_exit; }
$| = 1;
@@ -101,7 +101,7 @@ if ($opt{'D'} && @ARGV)
# List obsolete or NO_BIN_ON_FTP/RESTRICTED prebuilt packages
#
- if ($opt{'p'} || $opt{'R'} || $opt{'V'})
+ if ($opt{'p'} || $opt{'O'} || $opt{'R'} || $opt{'V'})
{
if ($opt{'V'})
{
@@ -116,7 +116,7 @@ if ($opt{'D'} && @ARGV)
}
close(VULN);
}
- if ($opt{'p'} || $opt{'R'})
+ if ($opt{'p'} || $opt{'O'} || $opt{'R'})
{ &scan_pkgsrc_makefiles($pkgsrcdir); }
@prebuilt_pkgdirs = ($default_vars->{'PACKAGES'});
while (@prebuilt_pkgdirs)
@@ -291,6 +291,11 @@ sub check_prebuilt_packages
print "$File::Find::dir/$_\n";
push(@matched_prebuiltpackages, "$File::Find::dir/$_");
}
+ if ($opt{'O'} && defined $pkg{$pkgname}{$chkver}->{'osversion_specific'})
+ {
+ print "$File::Find::dir/$_\n";
+ push(@matched_prebuiltpackages, "$File::Find::dir/$_");
+ }
}
}
@@ -643,6 +648,8 @@ sub parse_makefile_pkgsrc
if (defined $vars->{'NO_BIN_ON_FTP'} ||
defined $vars->{'RESTRICTED'})
{ $pkg{$1}{$2}{'restricted'} = 1; }
+ if (defined $vars->{'OSVERSION_SPECIFIC'})
+ { $pkg{$1}{$2}{'osversion_specific'} = 1; }
if (defined $vars->{'BROKEN'})
{ $pkg{$1}{$2}{'BROKEN'} = $vars->{'BROKEN'}; }
if ($file =~ m:([^/]+)/([^/]+)/Makefile$:)
@@ -1126,8 +1133,9 @@ Installed package options: Distfile options:
Prebuilt package options: Makefile options:
-p : List old/obsolete -B : List packages marked as 'BROKEN'
- -R : List NO_BIN_ON_FTP/RESTRICTED -d : Check 'DEPENDS' up to date
- -V : List known vulnerabilities -S : List packages not in 'SUBDIRS'
+ -O : List OSVERSION_SPECIFIC -d : Check 'DEPENDS' up to date
+ -R : List NO_BIN_ON_FTP/RESTRICTED -S : List packages not in 'SUBDIRS'
+ -V : List known vulnerabilities
Misc:
-g file : Generate 'pkgname pkgdir pkgver' map in file