pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc Update pkglint to 3.81



details:   https://anonhg.NetBSD.org/pkgsrc/rev/079269e85ab5
branches:  trunk
changeset: 477219:079269e85ab5
user:      abs <abs%pkgsrc.org@localhost>
date:      Mon Jun 28 09:55:44 2004 +0000

description:
Update pkglint to 3.81
    - Rework undefined variable handling. Fixes issue introduces in 3.80
    - Never run a pkg_info in pkgdistdir. Avoids a serious misfeature of
      pkg_info whereby it looks for a package in the current directory
      by default.

diffstat:

 doc/CHANGES                          |   4 +++-
 pkgtools/pkglint/Makefile            |   4 ++--
 pkgtools/pkglint/files/lintpkgsrc.pl |  25 ++++++++++++++++---------
 3 files changed, 21 insertions(+), 12 deletions(-)

diffs (126 lines):

diff -r 8e2c73e68a83 -r 079269e85ab5 doc/CHANGES
--- a/doc/CHANGES       Mon Jun 28 08:15:42 2004 +0000
+++ b/doc/CHANGES       Mon Jun 28 09:55:44 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.6361 2004/06/28 08:15:42 adam Exp $
+$NetBSD: CHANGES,v 1.6362 2004/06/28 09:56:44 abs Exp $
 
 Changes to the packages collection and infrastructure in 2004:
 
@@ -3122,3 +3122,5 @@
        Updated mips64emul to 20040627 [xtraeme 2004-06-28]
        Added txt2pdbdoc-1.4.4 [minskim 2004-06-28]
        Updated libsndfile to 1.0.10 [adam 2004-06-28]
+       Updated pkglint to 3.81 [abs 2004-06-28]
+
diff -r 8e2c73e68a83 -r 079269e85ab5 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Mon Jun 28 08:15:42 2004 +0000
+++ b/pkgtools/pkglint/Makefile Mon Jun 28 09:55:44 2004 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.193 2004/06/27 22:47:38 abs Exp $
+# $NetBSD: Makefile,v 1.194 2004/06/28 09:55:44 abs Exp $
 #
 
-DISTNAME=      pkglint-3.80
+DISTNAME=      pkglint-3.81
 CATEGORIES=    pkgtools devel
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r 8e2c73e68a83 -r 079269e85ab5 pkgtools/pkglint/files/lintpkgsrc.pl
--- a/pkgtools/pkglint/files/lintpkgsrc.pl      Mon Jun 28 08:15:42 2004 +0000
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl      Mon Jun 28 09:55:44 2004 +0000
@@ -1,6 +1,6 @@
 #!@PERL@
 
-# $NetBSD: lintpkgsrc.pl,v 1.90 2004/06/27 22:47:38 abs Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.91 2004/06/28 09:55:44 abs Exp $
 
 # Written by David Brownlee <abs%netbsd.org@localhost>.
 #
@@ -41,6 +41,10 @@
     { usage_and_exit(); }
 $| = 1;
 
+# Horrible kludge to ensure we have a value for testing in conditionals, but
+# gets removed in the final evaluation
+my $magic_undefined = 'M_a_G_i_C_UNDEFINED';
+
 get_default_makefile_vars(); # $default_vars
 
 if ($opt{D} && @ARGV)
@@ -81,10 +85,9 @@
                                                        $opt{o}, $opt{m});
        if ($opt{r})
            {
-           safe_chdir("$pkgdistdir");
            verbose("Unlinking 'bad' distfiles\n");
            foreach my $distfile (@baddist)
-               { unlink($distfile); }
+               { unlink("$pkgdistdir/$distfile"); }
            }
        }
 
@@ -1011,6 +1014,8 @@
                }
            }
        }
+    foreach my $key (keys %vars)
+       { $vars{$key} =~ s/$magic_undefined//; }
     \%vars;
     }
 
@@ -1023,7 +1028,7 @@
        if (defined(${$vars}{$1}))
            { $line = $`.${$vars}{$1}.$'; }
        else
-           { $line = $`.$'; }
+           { $line = $`.$magic_undefined.$'; }
        }
     $line;
     }
@@ -1037,7 +1042,7 @@
        if (defined(${$vars}{$1}))
            { $line = $`.${$vars}{$1}.$'; }
        else
-           { $line = $`.$'; }
+           { $line = $`.$magic_undefined.$'; }
        }
     $line;
     }
@@ -1127,6 +1132,7 @@
     {
     my($dir) = @_;
 
+    debug("chdir: $dir");
     if (! chdir($dir))
        { fail("Unable to chdir($dir): $!"); }
     }
@@ -1278,16 +1284,16 @@
        if (@distwarn)
            { verbose(@distwarn); }
        verbose("checksum mismatches\n");
-       safe_chdir("$pkgdistdir");
+       safe_chdir($pkgdistdir);
        foreach my $sum (keys %sumfiles)
            {
            if ($sum eq 'Size')
                {
-               foreach (@{$sumfiles{$sum}})
+               foreach my $file (@{$sumfiles{$sum}})
                    {
-                   if (! -f $_ || -S $_ != $distfiles{$_}{sum})
+                   if (! -f $file || -S $file != $distfiles{$_}{sum})
                        {
-                       print $_, " (Size)\n";
+                       print $file, " (Size)\n";
                        $bad_distfiles{$_} = 1;
                        }
                    }
@@ -1308,6 +1314,7 @@
                }
            close(DIGEST);
            }
+       safe_chdir('/'); # Do not want to stay in $pkgdistdir
        }
     (sort keys %bad_distfiles);
     }



Home | Main Index | Thread Index | Old Index