pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint Update to 3.99:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3fb5aeeac718
branches:  trunk
changeset: 488585:3fb5aeeac718
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Fri Feb 04 15:46:58 2005 +0000

description:
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.

diffstat:

 pkgtools/pkglint/Makefile            |   4 ++--
 pkgtools/pkglint/files/lintpkgsrc.pl |  23 ++++++++++++++++++-----
 2 files changed, 20 insertions(+), 7 deletions(-)

diffs (80 lines):

diff -r 66e2a646bbc4 -r 3fb5aeeac718 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Fri Feb 04 15:45:16 2005 +0000
+++ b/pkgtools/pkglint/Makefile Fri Feb 04 15:46:58 2005 +0000
@@ -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 -r 66e2a646bbc4 -r 3fb5aeeac718 pkgtools/pkglint/files/lintpkgsrc.pl
--- a/pkgtools/pkglint/files/lintpkgsrc.pl      Fri Feb 04 15:45:16 2005 +0000
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl      Fri Feb 04 15:46:58 2005 +0000
@@ -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@localhost>.
 #
@@ -355,7 +355,8 @@
     {
     # 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 @@
        elsif ($elem =~ /^_$/) {
            push(@temp, 0);
        }
+       elsif ($elem =~ /^pre$/) {
+           push(@temp, -1);
+       }
        elsif ($elem =~ /^rc$/) {
            push(@temp, -1);
        }
@@ -652,9 +656,7 @@
 
        ($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 @@
     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 @@
        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))



Home | Main Index | Thread Index | Old Index