pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint Update pkglint to 3.62:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/39b90a1ab665
branches:  trunk
changeset: 462338:39b90a1ab665
user:      abs <abs%pkgsrc.org@localhost>
date:      Tue Sep 30 16:09:50 2003 +0000

description:
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:

 pkgtools/pkglint/Makefile            |   4 ++--
 pkgtools/pkglint/files/lintpkgsrc.pl |  27 ++++++++++++---------------
 2 files changed, 14 insertions(+), 17 deletions(-)

diffs (75 lines):

diff -r b2437d3e1ff0 -r 39b90a1ab665 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Tue Sep 30 15:07:42 2003 +0000
+++ b/pkgtools/pkglint/Makefile Tue Sep 30 16:09:50 2003 +0000
@@ -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 -r b2437d3e1ff0 -r 39b90a1ab665 pkgtools/pkglint/files/lintpkgsrc.pl
--- a/pkgtools/pkglint/files/lintpkgsrc.pl      Tue Sep 30 15:07:42 2003 +0000
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl      Tue Sep 30 16:09:50 2003 +0000
@@ -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@localhost>.
 #
@@ -18,7 +18,7 @@
 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 @@
            {
            $_ = $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"; }
+
+               $incfile = realpath($incfile);
+
+               if (!$incfiles{$incfile})
                    {
-                   $incfile = "$CURDIR/$incfile";
+                   if ($opt{L})
+                       { print "inc $incfile\n"; }
+                   $incfiles{$incfile} = 1;
                    $NEWCURDIR = $incfile;
                    $NEWCURDIR =~ s#/[^/]*$##;
-                   }
-               else
-                   {
-                   $NEWCURDIR = $CURDIR;
-                   }
-               if (!$incfiles{$incfile})
-                   {
-                   $incfiles{$incfile} = 1;
                    if (!open(FILE, $incfile))
                        { verbose("Cannot open '$incfile' (from $file): $!\n");}
                    else



Home | Main Index | Thread Index | Old Index