pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Properly check the return value...
details: https://anonhg.NetBSD.org/pkgsrc/rev/52414b64a9b3
branches: trunk
changeset: 535342:52414b64a9b3
user: rillig <rillig%pkgsrc.org@localhost>
date: Wed Nov 14 16:03:07 2007 +0000
description:
Properly check the return value of load_lines("PLIST.common").
diffstat:
pkgtools/pkglint/files/pkglint.pl | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 70e27600241e -r 52414b64a9b3 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Wed Nov 14 15:45:50 2007 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Wed Nov 14 16:03:07 2007 +0000
@@ -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 @@
# 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;
Home |
Main Index |
Thread Index |
Old Index