summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorwiz <wiz>2004-11-04 12:37:02 +0000
committerwiz <wiz>2004-11-04 12:37:02 +0000
commit08c9a32b536d7c04efe3c4d6c3111e0a2b6a510f (patch)
tree0ac002a95856b4c121831ebd89a2ea5a017a02b9 /pkgtools
parent32a384b22f14ead4e7e9736a3a117f69c3f7a763 (diff)
downloadpkgsrc-08c9a32b536d7c04efe3c4d6c3111e0a2b6a510f.tar.gz
Test if pkgname is defined before using it; gets rid of some warnings:
Use of uninitialized value in pattern match (m//) at /usr/pkg/bin/lintpkgsrc line 747. Patch from Nicolas Joly in PR 27875.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/Makefile4
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl4
2 files changed, 4 insertions, 4 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index 6c0d9c6e905..7d4a8ae913b 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.208 2004/10/28 13:03:10 wiz Exp $
+# $NetBSD: Makefile,v 1.209 2004/11/04 12:37:02 wiz Exp $
#
-DISTNAME= pkglint-3.94
+DISTNAME= pkglint-3.95
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl
index f8794a5462d..5f86304b15b 100755
--- a/pkgtools/pkglint/files/lintpkgsrc.pl
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl
@@ -1,6 +1,6 @@
#!@PERL@
-# $NetBSD: lintpkgsrc.pl,v 1.93 2004/09/05 23:12:37 seb Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.94 2004/11/04 12:37:02 wiz Exp $
# Written by David Brownlee <abs@netbsd.org>.
#
@@ -744,7 +744,7 @@ sub parse_makefile_pkgsrc
if (defined $vars->{DISTNAME})
{ debug("$file: DISTNAME=$vars->{DISTNAME}\n"); }
- if ($pkgname !~ /(.*)-(\d.*)/)
+ if (! defined $pkgname || $pkgname !~ /(.*)-(\d.*)/)
{
# invoke make here as a last resort
my($pkgsrcdir) = ($file =~ m:(/.*)/:);