ports/136657: [PATCH] ports-mgmt/portlint: Fix string comparison with undef
Greg Lewis
glewis at FreeBSD.org
Sat Jul 11 08:50:01 UTC 2009
>Number: 136657
>Category: ports
>Synopsis: [PATCH] ports-mgmt/portlint: Fix string comparison with undef
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Jul 11 08:50:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Greg Lewis
>Release: FreeBSD 7.2-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD misty.eyesbeyond.com 7.2-RELEASE-p2 FreeBSD 7.2-RELEASE-p2 #0: Wed Jun 24 22:24:47 PDT 2009
>Description:
portlint currently does potential comparisons against undef when checking
for manual pages in the packing list. E.g., when I run it against the
current version of the lang/mono port I see errors like this:
Use of uninitialized value in string eq at /usr/local/bin/portlint line 914, <IN> line 865.
FATAL: /usr/ports/lang/mono/pkg-plist: [865]: unpacked man file csharp.1 listed. must be gzipped.
Use of uninitialized value in string ne at /usr/local/bin/portlint line 931, <IN> line 865.
Since perl considers a blank string "false", changing the conditionals from
an explicit string (in)equality check to a true/false on the value itself
fixes it for me.
I'll submit a separate patch to fix the problems with mono.
Port maintainer (marcus at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
--- portlint-2.12.0.patch begins here ---
Index: src/portlint.pl
===================================================================
RCS file: /var/fcvs/ports/ports-mgmt/portlint/src/portlint.pl,v
retrieving revision 1.110
diff -u -r1.110 portlint.pl
--- src/portlint.pl 9 Jul 2009 01:03:38 -0000 1.110
+++ src/portlint.pl 11 Jul 2009 08:27:19 -0000
@@ -911,7 +911,7 @@
}
if ($_ =~ m#man/([^/]+/)?man([$manchapters])/([^\.]+\.[$manchapters])(\.gz)?$#) {
- if ($4 eq '') {
+ if (!$4) {
$plistman{$2} .= ' ' . $3;
if ($mancompress) {
&perror("FATAL", $file, $.,
@@ -928,7 +928,7 @@
}
}
$plistmanall{$2} .= ' ' . $3;
- if ($1 ne '') {
+ if ($1) {
$manlangs{substr($1, 0, length($1) - 1)}++;
}
}
--- portlint-2.12.0.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list