summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authoratatat <atatat@pkgsrc.org>2002-09-22 15:58:33 +0000
committeratatat <atatat@pkgsrc.org>2002-09-22 15:58:33 +0000
commita72f2e551436def0655d28f1ac5d942177c22ea2 (patch)
treec620975d0bcb8c41ba13a612e778f57c1b7b30a6 /pkgtools
parent9a8885a195b06687d9cf679001462e9c64c57c80 (diff)
downloadpkgsrc-a72f2e551436def0655d28f1ac5d942177c22ea2.tar.gz
If the installed version of pkg_install is newer than the one in
pkgsrc, require the new version instead of the one from pkgsrc. This means there will be no more messages that look like Version mismatch: 'pkg_install' 20020827 vs 20020723 Change reviewed by the wiz. :)
Diffstat (limited to 'pkgtools')
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl
index 3d30d52333f..aeeac79ef02 100755
--- a/pkgtools/pkglint/files/lintpkgsrc.pl
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl
@@ -1,6 +1,6 @@
#!@PREFIX@/bin/perl
-# $NetBSD: lintpkgsrc.pl,v 1.69 2002/08/13 15:05:31 wiz Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.70 2002/09/22 15:58:33 atatat Exp $
# Written by David Brownlee <abs@netbsd.org>.
#
@@ -20,6 +20,7 @@ use Getopt::Std;
use File::Find;
use Cwd;
my( $pkglist, # list of Pkg packages
+ $pkg_installver, # installed version of pkg_install pseudo-pkg
$default_vars, # Set for Makefiles, inc PACKAGES & PKGSRCDIR
%opt, # Command line options
%vuln, # vulnerability data
@@ -532,7 +533,7 @@ sub list_installed_packages
close(PKG_INFO);
# pkg_install is not in the pkg_info -a output, add it manually
- $pkgver = `pkg_info -V 2>/dev/null || echo 20010302`;
+ $pkg_installver = $pkgver = `pkg_info -V 2>/dev/null || echo 20010302`;
chomp($pkgver);
push(@pkgs, "pkg_install-$pkgver");
@pkgs;
@@ -711,6 +712,8 @@ sub parse_makefile_pkgsrc
{ $pkgname = $vars->{PKGNAME}; }
elsif (defined $vars->{DISTNAME})
{ $pkgname = $vars->{DISTNAME}; }
+ if ($pkgname =~ /^pkg_install-(\d+)$/ && $1 < $pkg_installver)
+ { $pkgname = "pkg_install-$pkg_installver"; }
if (defined $pkgname)
{
if (defined $vars->{PKGREVISION}