diff options
author | rillig <rillig@pkgsrc.org> | 2006-05-21 15:46:43 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-05-21 15:46:43 +0000 |
commit | 0804d71fb042ac7cc4564762ff6ece026c35e474 (patch) | |
tree | 1c0440e1e7c08ef21fc9fb66a7287e6996251147 /pkgtools | |
parent | 4865d81ca81611e4fc1cc6920192185cc8f24aaa (diff) | |
download | pkgsrc-0804d71fb042ac7cc4564762ff6ece026c35e474.tar.gz |
- PLISTs should not contain perllocal.pod.
- Variables called *_HOME are assumed to contain a single pathname.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 07e23ddfb06..5b57adad1c6 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.585 2006/05/19 09:05:59 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.586 2006/05/21 15:46:43 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -2284,7 +2284,7 @@ sub type_should_be_quoted($) { sub variable_needs_quoting($) { my ($varname) = @_; - return !($varname =~ qr"^(?:.*DIR|.*_GROUP|(?:BIN|LIB|MAN|GAMES|SHARE)(?:GRP|OWN|MODE)|.*_USER|BUILDLINK_PREFIX\..*|DISTNAME|LOCALBASE|PKGNAME|PREFIX|WRKSRC)$"); + return !($varname =~ qr"^(?:.*DIR|.*_GROUP|.*_HOME|(?:BIN|LIB|MAN|GAMES|SHARE)(?:GRP|OWN|MODE)|.*_USER|BUILDLINK_PREFIX\..*|DISTNAME|LOCALBASE|PKGNAME|PREFIX|WRKSRC)$"); } my $check_pkglint_version_done = false; @@ -3800,7 +3800,7 @@ sub checkline_mk_vartype($$$$$) { # Guess the datatype of the variable based on # naming conventions. $type = ($varname =~ qr"DIRS$") ? PkgLint::Type->new(LK_EXTERNAL, "Pathmask", []) - : ($varname =~ qr"DIR$") ? PkgLint::Type->new(LK_NONE, "Pathname", []) + : ($varname =~ qr"(?:DIR|_HOME)$") ? PkgLint::Type->new(LK_NONE, "Pathname", []) : ($varname =~ qr"FILES$") ? PkgLint::Type->new(LK_EXTERNAL, "Pathmask", []) : ($varname =~ qr"FILE$") ? PkgLint::Type->new(LK_NONE, "Pathname", []) : ($varname =~ qr"PATH$") ? PkgLint::Type->new(LK_NONE, "Pathlist", []) @@ -5289,6 +5289,12 @@ sub checkfile_PLIST($) { if ($text =~ qr"\.orig$") { $line->log_warning(".orig files should not be in the PLIST."); } + if ($text =~ qr"/perllocal\.pod$") { + $line->log_warning("perllocal.pod files should not be in the PLIST."); + $line->explain_warning( + "This file is handled automatically by the INSTALL/DEINSTALL scripts,", + "since its contents changes frequently."); + } if ($text =~ qr"^(.*)(\.a|\.so[0-9.]*)$") { my ($basename, $ext) = ($1, $2); |