diff options
author | rillig <rillig> | 2006-01-14 11:56:09 +0000 |
---|---|---|
committer | rillig <rillig> | 2006-01-14 11:56:09 +0000 |
commit | 80dd5e8c60f0cc023add3aab63765f96cbced0e9 (patch) | |
tree | ed66d2041522fccc12d36cea9806339402823c54 /pkgtools | |
parent | 9bb99525e06bd2924e20c544bc7bfc9d9bcbb7fe (diff) | |
download | pkgsrc-80dd5e8c60f0cc023add3aab63765f96cbced0e9.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.pl | 5 |
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"; |