diff options
author | rillig <rillig> | 2006-02-12 18:35:59 +0000 |
---|---|---|
committer | rillig <rillig> | 2006-02-12 18:35:59 +0000 |
commit | e3342250d2e144a6e72eb445ac3f7554665bbd1f (patch) | |
tree | 6886792d69d3e97307cc064fe9883dedd2dbea1e /pkgtools | |
parent | 4b7e86d4333c93cb4ba482b1342ff539124ad90d (diff) | |
download | pkgsrc-e3342250d2e144a6e72eb445ac3f7554665bbd1f.tar.gz |
Correctly handle Python and Ruby prefixes in binary package names. Patch
provided by YOMURA Masanori in private mail.
Diffstat (limited to 'pkgtools')
-rwxr-xr-x | pkgtools/pkglint/files/lintpkgsrc.pl | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl index 1adc13a1deb..238f140728b 100755 --- a/pkgtools/pkglint/files/lintpkgsrc.pl +++ b/pkgtools/pkglint/files/lintpkgsrc.pl @@ -1,6 +1,6 @@ #!@PERL@ -# $NetBSD: lintpkgsrc.pl,v 1.109 2005/12/31 09:07:22 rillig Exp $ +# $NetBSD: lintpkgsrc.pl,v 1.110 2006/02/12 18:35:59 rillig Exp $ # Written by David Brownlee <abs@netbsd.org>. # @@ -269,6 +269,11 @@ sub check_prebuilt_packages my($pkg, $ver); ($pkg, $ver) = ($1, $2); + # XXX: hack for python and ruby prefix support + $pkg =~ s/^py[0-9][0-9]pth-/py-/; + $pkg =~ s/^py[0-9][0-9]-/py-/; + $pkg =~ s/^ruby[0-9][0-9]-/ruby-/; + if ($opt{V} && $vuln{$pkg}) { foreach my $chk (@{$vuln{$pkg}}) @@ -569,10 +574,12 @@ sub list_installed_packages { my ($pkg); $pkg = (split)[0]; + # XXX: hack for python and ruby prefix support - $pkg =~ s/^py..pth-/py-/; - $pkg =~ s/^py..-/py-/; - $pkg =~ s/^ruby..-/ruby-/; + $pkg =~ s/^py[0-9][0-9]pth-/py-/; + $pkg =~ s/^py[0-9][0-9]-/py-/; + $pkg =~ s/^ruby[0-9][0-9]-/ruby-/; + push(@pkgs, $pkg); } close(PKG_INFO); |