diff options
author | rillig <rillig@pkgsrc.org> | 2006-01-14 11:56:09 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-01-14 11:56:09 +0000 |
commit | 76967e1b582a44533a8bdee2b92bbd00a16ef791 (patch) | |
tree | ed66d2041522fccc12d36cea9806339402823c54 /pkgtools | |
parent | a6d04f353f0cc556bc3be044b902726f6fa1d69e (diff) | |
download | pkgsrc-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.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"; |