summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2007-11-14 16:03:07 +0000
committerrillig <rillig>2007-11-14 16:03:07 +0000
commit32b4bbe23cbf3eb26f7467978d9c17b22b57e1da (patch)
tree1838ce42c953f3bed5673e6faf2b304c52f944a5 /pkgtools
parent23ef519cd959fb0b33d3afd6122f40b1fa46a2a0 (diff)
downloadpkgsrc-32b4bbe23cbf3eb26f7467978d9c17b22b57e1da.tar.gz
Properly check the return value of load_lines("PLIST.common").
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl11
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;