From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jul 11 08:50:01 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6145A1065670 for ; Sat, 11 Jul 2009 08:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 38F0F8FC15 for ; Sat, 11 Jul 2009 08:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6B8o1Zl018258 for ; Sat, 11 Jul 2009 08:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6B8o10b018257; Sat, 11 Jul 2009 08:50:01 GMT (envelope-from gnats) Resent-Date: Sat, 11 Jul 2009 08:50:01 GMT Resent-Message-Id: <200907110850.n6B8o10b018257@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Greg Lewis Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E4211065675; Sat, 11 Jul 2009 08:48:43 +0000 (UTC) (envelope-from glewis@misty.eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.freebsd.org (Postfix) with ESMTP id 44DB68FC0A; Sat, 11 Jul 2009 08:48:43 +0000 (UTC) (envelope-from glewis@misty.eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.14.3/8.14.3) with ESMTP id n6B8ajAg008361; Sat, 11 Jul 2009 01:36:45 -0700 (PDT) (envelope-from glewis@misty.eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.14.3/8.14.3/Submit) id n6B8ajQv008360; Sat, 11 Jul 2009 01:36:45 -0700 (PDT) (envelope-from glewis) Message-Id: <200907110836.n6B8ajQv008360@misty.eyesbeyond.com> Date: Sat, 11 Jul 2009 01:36:45 -0700 (PDT) From: Greg Lewis To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: marcus@FreeBSD.org Subject: ports/136657: [PATCH] ports-mgmt/portlint: Fix string comparison with undef X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2009 08:50:01 -0000 >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, 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, 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@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: