From 72c143443e8a7820b0773e6702cd00a96b92b60c Mon Sep 17 00:00:00 2001 From: rillig Date: Sat, 30 Jul 2005 23:35:24 +0000 Subject: The global variables are only needed when checking a package, not a package category. --- pkgtools/pkglint/files/pkglint.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index f9e7332fb1f..6ff162de6f1 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -11,7 +11,7 @@ # Freely redistributable. Absolutely no warranty. # # From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp -# $NetBSD: pkglint.pl,v 1.217 2005/07/29 16:01:13 he Exp $ +# $NetBSD: pkglint.pl,v 1.218 2005/07/30 23:35:24 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -565,7 +565,6 @@ sub load_predefined_sites($) { sub check_directory($) { my ($dir) = @_; - init_global_vars(); if (-f "${dir}/../mk/bsd.pkg.mk") { log_info(NO_FILE, NO_LINE_NUMBER, "Checking category Makefile."); check_category($dir); @@ -595,6 +594,8 @@ sub check_package($) { my ($whole, $lines); + init_global_vars(); + # we need to handle the Makefile first to get some variables if (!load_package_Makefile($dir, "${dir}/Makefile", \$whole, \$lines)) { log_error("${dir}/Makefile", NO_LINE_NUMBER, "Cannot be read."); -- cgit v1.2.3