summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authoratatat <atatat@pkgsrc.org>2003-01-02 22:17:45 +0000
committeratatat <atatat@pkgsrc.org>2003-01-02 22:17:45 +0000
commit3ecbe5d6698e15a12d5287935b8021fe8459037d (patch)
tree2f36ac6aa7f35bafe573bfd99ec7df3bfbce2de8 /pkgtools
parent6c7fb308428cfc091ca9ea3eac87d07923544e18 (diff)
downloadpkgsrc-3ecbe5d6698e15a12d5287935b8021fe8459037d.tar.gz
In the case that we really can't determine the PKGNAME properly, just
punt and invoke "make show-vars VARNAMES=PKGNAME" and get make to tell us. This addresses the issue of: Cannot extract digest-UNDEFINED version (/usr/pkgsrc/pkgtools/digest/Makefile) Cannot extract pkg_install-UNDEFINED version (/usr/pkgsrc/pkgtools/pkg_install/Makefile) Unknown package: 'digest' version 20010807 Unknown package: 'pkg_install' version 20021123 Patch reviewed by the wiz.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/Makefile4
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl10
2 files changed, 11 insertions, 3 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index 554e6171308..276db3c82aa 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.144 2002/12/10 14:30:36 schmonz Exp $
+# $NetBSD: Makefile,v 1.145 2003/01/02 22:17:45 atatat Exp $
#
-DISTNAME= pkglint-3.39
+DISTNAME= pkglint-3.40
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl
index b68748c425d..0c3c46007d0 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.72 2002/11/14 04:01:56 wiz Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.73 2003/01/02 22:17:46 atatat Exp $
# Written by David Brownlee <abs@netbsd.org>.
#
@@ -712,6 +712,14 @@ sub parse_makefile_pkgsrc
{ $pkgname = $vars->{PKGNAME}; }
elsif (defined $vars->{DISTNAME})
{ $pkgname = $vars->{DISTNAME}; }
+ if ($pkgname !~ /(.*)-(\d.*)/)
+ {
+ # invoke make here as a last resort
+ my($pkgsrcdir) = ($file =~ m:(/.*)/:);
+ my($makepkgname) = `cd $pkgsrcdir ; make show-vars VARNAMES=PKGNAME`;
+ if ($makepkgname =~ /(.*)-(\d.*)/)
+ { $pkgname = $makepkgname; }
+ }
if ($pkgname =~ /^pkg_install-(\d+)$/ && $1 < $pkg_installver)
{ $pkgname = "pkg_install-$pkg_installver"; }
if (defined $pkgname)