summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorabs <abs>2003-09-30 16:09:50 +0000
committerabs <abs>2003-09-30 16:09:50 +0000
commitcecbd7b00bd580fc49c3be83a545eddf2656f654 (patch)
tree2933a11096bc4adcd86fa8167a82fc83f8cd664d /pkgtools
parent4b6e5a955aa68e8098ae1a5a2d6feb6133dd46d4 (diff)
downloadpkgsrc-cecbd7b00bd580fc49c3be83a545eddf2656f654.tar.gz
Update pkglint to 3.62:
lintpkgsrc - handle the buildlink include fest: - Using realpath() to fix exclude of duplicate includes speeds up 'lintpkgsrc -rp' on a PIII-500 from 40 minutes to 3 - Excluding buildlink[^/]*.mk files unless -d is specified further speeds up to just under 1 minute
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/Makefile4
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl27
2 files changed, 14 insertions, 17 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index 7938ee5809d..c4f125fe06f 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.168 2003/09/21 20:32:35 wiz Exp $
+# $NetBSD: Makefile,v 1.169 2003/09/30 16:09:50 abs Exp $
#
-DISTNAME= pkglint-3.61
+DISTNAME= pkglint-3.62
WRKSRC= ${WRKDIR}
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl
index 3cbf5c4ab43..e0d4e65b7ce 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.82 2003/09/21 20:32:36 wiz Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.83 2003/09/30 16:09:50 abs Exp $
# Written by David Brownlee <abs@netbsd.org>.
#
@@ -18,7 +18,7 @@ use locale;
use strict;
use Getopt::Std;
use File::Find;
-use Cwd;
+use Cwd 'realpath', 'getcwd';
my( $pkglist, # list of Pkg packages
$pkg_installver, # installed version of pkg_install pseudo-pkg
$default_vars, # Set for Makefiles, inc PACKAGES & PKGSRCDIR
@@ -873,31 +873,28 @@ sub parse_makefile_vars
{
$_ = $1;
debug("$file: .include \"$_\"\n");
- if (m#/mk/bsd#)
+ if (m#/mk/bsd# || (!$opt{d} && m#/(buildlink[^/]*\.mk)#))
{ debug("$file: .include skipped\n"); }
else
{
- my($incfile) = ($_);
+ my($incfile) = $_;
# Expand any simple vars in $incfile
#
$incfile = parse_expand_vars($incfile, \%vars);
- # Handle relative path incfile
- #
if (substr($incfile, 0, 1) ne '/')
- {
- $incfile = "$CURDIR/$incfile";
- $NEWCURDIR = $incfile;
- $NEWCURDIR =~ s#/[^/]*$##;
- }
- else
- {
- $NEWCURDIR = $CURDIR;
- }
+ { $incfile = "$CURDIR/$incfile"; }
+
+ $incfile = realpath($incfile);
+
if (!$incfiles{$incfile})
{
+ if ($opt{L})
+ { print "inc $incfile\n"; }
$incfiles{$incfile} = 1;
+ $NEWCURDIR = $incfile;
+ $NEWCURDIR =~ s#/[^/]*$##;
if (!open(FILE, $incfile))
{ verbose("Cannot open '$incfile' (from $file): $!\n");}
else