Handle package names with regex meta characters (eg gtk+ )
This commit is contained in:
parent
cc0ff64bd3
commit
340e896bb1
2 changed files with 6 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
# $NetBSD: Makefile,v 1.17 1999/09/13 02:44:46 hubertf Exp $
|
||||
# $NetBSD: Makefile,v 1.18 1999/11/12 13:18:02 abs Exp $
|
||||
#
|
||||
|
||||
DISTNAME= pkglint-1.77
|
||||
DISTNAME= pkglint-1.78
|
||||
CATEGORIES= pkgtools devel
|
||||
MASTER_SITES= # empty
|
||||
DISTFILES= # empty
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
# $NetBSD: lintpkgsrc.pl,v 1.6 1999/09/25 16:06:54 drochner Exp $
|
||||
# $NetBSD: lintpkgsrc.pl,v 1.7 1999/11/12 13:18:03 abs Exp $
|
||||
|
||||
# (Somewhat quickly) Written by David Brownlee <abs@netbsd.org>.
|
||||
# Caveats:
|
||||
|
@ -103,15 +103,16 @@ sub fail
|
|||
sub list_possible_versions
|
||||
{
|
||||
my($pkg)=@_;
|
||||
my($pkgname,@maybe,$fail);
|
||||
my($pkgname,@maybe,$fail,$len);
|
||||
|
||||
if (!defined($pkg2dir{$pkg}))
|
||||
{
|
||||
$pkgname=$pkg;
|
||||
$pkgname =~ s/-[^-]+$/-/;
|
||||
$len=length($pkgname);
|
||||
foreach ( sort keys %pkg2dir )
|
||||
{
|
||||
if (/^$pkgname[0-9]/)
|
||||
if (substr($_,0,$len) eq $pkgname && substr($_,$len,1) =~ /[0-9]/)
|
||||
{ push(@maybe,$_); }
|
||||
}
|
||||
$_="Unknown package: '$pkg'";
|
||||
|
|
Loading…
Reference in a new issue