From a72f2e551436def0655d28f1ac5d942177c22ea2 Mon Sep 17 00:00:00 2001 From: atatat Date: Sun, 22 Sep 2002 15:58:33 +0000 Subject: 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. :) --- pkgtools/pkglint/files/lintpkgsrc.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pkgtools') 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 . # @@ -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} -- cgit v1.2.3