diff options
author | rillig <rillig@pkgsrc.org> | 2007-11-14 16:03:07 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2007-11-14 16:03:07 +0000 |
commit | 58e89bfad335c4e5fc6e1db6c87b850ca91c7d4a (patch) | |
tree | 1838ce42c953f3bed5673e6faf2b304c52f944a5 /pkgtools | |
parent | ea64b5e3b90400b86a8bce2dec9cec3fde75ed9d (diff) | |
download | pkgsrc-58e89bfad335c4e5fc6e1db6c87b850ca91c7d4a.tar.gz |
Properly check the return value of load_lines("PLIST.common").
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 4f004ffa1b8..18c9ed3fc6b 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.734 2007/11/07 17:01:24 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.735 2007/11/14 16:03:07 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -7361,7 +7361,14 @@ sub checkfile_PLIST($) { # Get the list of all files from the PLIST. my $all_files = {}; my $all_dirs = {}; - my $extra_lines = (basename($fname) eq "PLIST.common_end") ? load_file(dirname($fname) . "PLIST.common") : []; + my $extra_lines = []; + if (basename($fname) eq "PLIST.common_end") { + my $common_lines = load_file(dirname($fname) . "PLIST.common"); + if ($common_lines) { + $extra_lines = $common_lines; + } + } + foreach my $line (@{$extra_lines}, @{$lines}) { my $text = $line->text; |