summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/CHANGES4
-rw-r--r--pkgtools/pkglint/Makefile4
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl25
3 files changed, 21 insertions, 12 deletions
diff --git a/doc/CHANGES b/doc/CHANGES
index d43bb99f491..78ee8d09131 100644
--- a/doc/CHANGES
+++ b/doc/CHANGES
@@ -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 @@ Changes to the packages collection and infrastructure in 2004:
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 --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index acc4b45ea23..82ab4902b89 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -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 --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl
index cf67e9ed631..61d9ec806da 100755
--- a/pkgtools/pkglint/files/lintpkgsrc.pl
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl
@@ -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>.
#
@@ -41,6 +41,10 @@ if (! getopts('BDE:I:K:LM:OP:RSVdg:hilmopru', \%opt) || $opt{h} ||
{ 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 @@ if ($opt{D} && @ARGV)
$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 @@ sub parse_makefile_vars
}
}
}
+ foreach my $key (keys %vars)
+ { $vars{$key} =~ s/$magic_undefined//; }
\%vars;
}
@@ -1023,7 +1028,7 @@ sub parse_expand_vars
if (defined(${$vars}{$1}))
{ $line = $`.${$vars}{$1}.$'; }
else
- { $line = $`.$'; }
+ { $line = $`.$magic_undefined.$'; }
}
$line;
}
@@ -1037,7 +1042,7 @@ sub parse_expand_vars_dumb
if (defined(${$vars}{$1}))
{ $line = $`.${$vars}{$1}.$'; }
else
- { $line = $`.$'; }
+ { $line = $`.$magic_undefined.$'; }
}
$line;
}
@@ -1127,6 +1132,7 @@ sub safe_chdir
{
my($dir) = @_;
+ debug("chdir: $dir");
if (! chdir($dir))
{ fail("Unable to chdir($dir): $!"); }
}
@@ -1278,16 +1284,16 @@ sub scan_pkgsrc_distfiles_vs_distinfo
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 @@ sub scan_pkgsrc_distfiles_vs_distinfo
}
close(DIGEST);
}
+ safe_chdir('/'); # Do not want to stay in $pkgdistdir
}
(sort keys %bad_distfiles);
}