summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-01-14 11:56:09 +0000
committerrillig <rillig@pkgsrc.org>2006-01-14 11:56:09 +0000
commit76967e1b582a44533a8bdee2b92bbd00a16ef791 (patch)
treeed66d2041522fccc12d36cea9806339402823c54 /pkgtools
parenta6d04f353f0cc556bc3be044b902726f6fa1d69e (diff)
downloadpkgsrc-76967e1b582a44533a8bdee2b92bbd00a16ef791.tar.gz
- The pkgdir variable is only defined when checking a pkgsrc package. For
other directories it is undefined. This avoids some false warnings when checking files in pkgsrc/mk/.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 59aa737dadb..eadddb624b4 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.473 2006/01/14 11:44:04 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.474 2006/01/14 11:56:09 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -3372,6 +3372,7 @@ sub checkfile_package_Makefile($$$) {
if (!exists($makevar->{"PLIST_SRC"})
&& !exists($makevar->{"NO_PKG_REGISTER"})
+ && defined($pkgdir)
&& !-f "${current_dir}/$pkgdir/PLIST"
&& !-f "${current_dir}/$pkgdir/PLIST.common") {
log_warning($fname, NO_LINE_NUMBER, "Neither PLIST nor PLIST.common exist, and PLIST_SRC and NO_PKG_REGISTER are unset. Are you sure PLIST handling is ok?");
@@ -4019,7 +4020,7 @@ sub checkitem($) {
}
# Initialize global variables.
- $pkgdir = ".";
+ $pkgdir = undef;
$filesdir = "files";
$patchdir = "patches";
$distinfo_file = "distinfo";