summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2000-05-16 11:41:07 +0000
committerabs <abs@pkgsrc.org>2000-05-16 11:41:07 +0000
commit1fe4f4cc6c4d982cd7537cd37fe9b5d8797ec4f6 (patch)
tree94259041a9dc874c56407f33ac3bd76875351e09 /pkgtools/pkglint
parent4c7eaa577a014ac2dde65f27251d88c646c157eb (diff)
downloadpkgsrc-1fe4f4cc6c4d982cd7537cd37fe9b5d8797ec4f6.tar.gz
In the event of multiple non current versions of a package being found, take
the one iwth the highest number as 'best'
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r--pkgtools/pkglint/Makefile4
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl17
2 files changed, 13 insertions, 8 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index be838caf4ad..5c03d5c3bad 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.47 2000/04/05 23:34:42 hubertf Exp $
+# $NetBSD: Makefile,v 1.48 2000/05/16 11:41:07 abs Exp $
#
-DISTNAME= pkglint-2.06
+DISTNAME= pkglint-2.07
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl
index 85ba09ae0b9..66211506ca7 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.23 2000/02/09 17:41:22 abs Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.24 2000/05/16 11:41:08 abs Exp $
# Written by David Brownlee <abs@netbsd.org>.
#
@@ -671,11 +671,16 @@ sub scan_pkgsrc_makefiles
{
if ($pkgname !~ /(.*)-(\d.*)/)
{ print "Cannot extract $pkgname version ($cat/$pkgdir)\n"; }
- elsif (!defined($pkg2ver{$1}) || $pkgdir !~ /-current/)
- { $pkg2ver{$1} = $2; }
- $pkgver2dir{$pkgname} = "$cat/$pkgdir";
- if (defined($vars{'DEPENDS'}))
- { $depends{$pkgname} = $vars{'DEPENDS'}; }
+ elsif ($pkgdir !~ /-current/)
+ {
+ if (defined $pkg2ver{$1} &&
+ &deweycmp($pkg2ver{$1}, '>', $2))
+ { next; }
+ $pkg2ver{$1} = $2;
+ $pkgver2dir{$pkgname} = "$cat/$pkgdir";
+ if (defined($vars{'DEPENDS'}))
+ { $depends{$pkgname} = $vars{'DEPENDS'}; }
+ }
}
}
close(CAT);