summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2005-02-04 15:46:58 +0000
committerwiz <wiz@pkgsrc.org>2005-02-04 15:46:58 +0000
commit93e603a0c1f9b156560b25e7ecc3b666849cd8f1 (patch)
tree122a273dfc2e5cc26d5fe3a74c8505c3d5903df0
parent1ef60c593f361e7eeedbc2224bd29bc016b15d72 (diff)
downloadpkgsrc-93e603a0c1f9b156560b25e7ecc3b666849cd8f1.tar.gz
Update to 3.99:
Fix lintpkgsrc handling of python and ruby packages. Remove invalid-dewey test that broke more things than it helped. Add support for "pre" in version strings. Update comment about recognised strings.
-rw-r--r--pkgtools/pkglint/Makefile4
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl23
2 files changed, 20 insertions, 7 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index 7d7e1647382..508fb8df28b 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.212 2004/12/02 16:40:10 wiz Exp $
+# $NetBSD: Makefile,v 1.213 2005/02/04 15:46:58 wiz Exp $
#
-DISTNAME= pkglint-3.98
+DISTNAME= pkglint-3.99
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl
index 5f86304b15b..7469434c80a 100755
--- a/pkgtools/pkglint/files/lintpkgsrc.pl
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl
@@ -1,6 +1,6 @@
#!@PERL@
-# $NetBSD: lintpkgsrc.pl,v 1.94 2004/11/04 12:37:02 wiz Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.95 2005/02/04 15:46:58 wiz Exp $
# Written by David Brownlee <abs@netbsd.org>.
#
@@ -355,7 +355,8 @@ sub convert_to_standard_dewey
{
# According to the current implementation in pkg_install/lib/str.c
# as of 2002/06/02, '_' before a number, '.', and 'pl' get treated as 0,
- # while 'rc' gets treated as -1; other characters are converted to lower
+ # while 'rc' and 'pre' get treated as -1; beta as '-2', alpha as '-3'.
+ # Other characters are converted to lower
# case and then to a number: a->1, b->2, c->3, etc. Numbers stay the same.
# 'nb' is a special case that's already been handled when we are here.
my($elem, $underscore, @temp);
@@ -369,6 +370,9 @@ sub convert_to_standard_dewey
elsif ($elem =~ /^_$/) {
push(@temp, 0);
}
+ elsif ($elem =~ /^pre$/) {
+ push(@temp, -1);
+ }
elsif ($elem =~ /^rc$/) {
push(@temp, -1);
}
@@ -652,9 +656,7 @@ sub package_globmatch
($matchpkgname, $test, $matchver) = ($1, $2, $3);
- if ($test ne '-' && $matchver !~ /^[\d.]+(pl\d+|p\d+|rc\d+|nb\d+|)*$/ )
- { $matchver = "invalid-dewey($test$matchver)"; }
- elsif (@pkgvers = $pkglist->pkgver($matchpkgname))
+ if (@pkgvers = $pkglist->pkgver($matchpkgname))
{
foreach my $pkgver (@pkgvers)
{
@@ -755,6 +757,13 @@ sub parse_makefile_pkgsrc
if ($pkgname =~ /^pkg_install-(\d+)$/ && $1 < $pkg_installver)
{ $pkgname = "pkg_install-$pkg_installver"; }
if (defined $pkgname)
+ {
+ # XXX: hack for python and ruby prefix support
+ $pkgname =~ s/^py..pth-/py-/;
+ $pkgname =~ s/^py..-/py-/;
+ $pkgname =~ s/^ruby..-/ruby-/;
+ }
+ if (defined $pkgname)
{
if (defined $vars->{PKGREVISION}
and not $vars->{PKGREVISION} =~ /^\s*$/ )
@@ -1211,6 +1220,10 @@ sub pkgsrc_check_depends
foreach my $depend (split(" ", $pkgver->var('DEPENDS')))
{
$depend =~ s/:.*// || next;
+ # XXX: hack for python prefix support
+ $depend =~ s/^py..pth-/py-/;
+ $depend =~ s/^py..-/py-/;
+ $depend =~ s/^ruby..-/ruby-/;
if (($msg = invalid_version($depend)))
{
if (!defined($err))