summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>1999-06-05 00:32:39 +0000
committerabs <abs@pkgsrc.org>1999-06-05 00:32:39 +0000
commit2e7a953911af4ca0b4870908acbd062208e9f97b (patch)
treeee6cafbf4d030e664c3be028fa6d0655e6970e6a /pkgtools/pkglint
parenta758ef6d0f4bc19a364519e9789065985ebe5f98 (diff)
downloadpkgsrc-2e7a953911af4ca0b4870908acbd062208e9f97b.tar.gz
Update to 1.71.
Avoid uninit var warning, plus tighten up 'Maybe ...' check for unknown packages
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r--pkgtools/pkglint/Makefile4
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl22
2 files changed, 15 insertions, 11 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index ee3f1485edd..59a5851bbe2 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.9 1999/04/19 07:32:09 abs Exp $
+# $NetBSD: Makefile,v 1.10 1999/06/05 00:32:39 abs Exp $
#
-DISTNAME= pkglint-1.70
+DISTNAME= pkglint-1.71
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl
index 8b19ec41794..1ee450d73cd 100755
--- a/pkgtools/pkglint/files/lintpkgsrc.pl
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
-# $NetBSD: lintpkgsrc.pl,v 1.2 1999/04/19 07:36:43 abs Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.3 1999/06/05 00:32:40 abs Exp $
# (Somewhat quickly) Written by David Brownlee <abs@anim.dreamworks.com>.
# Caveats:
@@ -70,27 +70,27 @@ sub list_possible_versions
my($pkg,%pkg2dir)=@_;
my($pkgname,@maybe,$fail);
- if( !defined($pkg2dir{$pkg}) )
+ if (!defined($pkg2dir{$pkg}))
{
$pkgname=$pkg;
- $pkgname =~ s/-[^-]+$//;
+ $pkgname =~ s/-[^-]+$/-/;
foreach ( sort keys %pkg2dir )
{
- if( substr($_,0,length($pkgname)) eq $pkgname )
+ if (/^$pkgname[0-9]/)
{ push(@maybe,$_); }
}
$_="Unknown package: '$pkg'";
if( @maybe )
{ $_.=" (Maybe @maybe)"; }
else
- { $_.=" (DBG $pkgname)"; }
+ { $_.=" ($pkgname)"; }
print "$_\n";
$fail=1;
}
$fail;
}
-# List (recursive) non diretory contents of specified directory
+# List (recursive) non directory contents of specified directory
#
sub listdir
{
@@ -178,9 +178,13 @@ sub parse_makefile
if ($vars{$key} =~ m#\${(\w+):S/(\w+)/(\w+)/}#)
{
my($var,$from,$to)=($1,$2,$3);
- $_=$vars{$var};
- s/$from/$to/;
- $vars{$key} =~ s#\${$var:S/$from/$to/}#$_#;
+
+ if (defined($vars{$var}))
+ {
+ $_=$vars{$var};
+ s/$from/$to/;
+ $vars{$key} =~ s#\${$var:S/$from/$to/}#$_#;
+ }
}
$vars{$key} =~ s/\$\{$value\}/$vars{$value}/g;
}