Date: Sat, 25 Apr 2009 17:28:21 +0400 (MSD) From: Eygene Ryabinkin <rea-fbsd@codelabs.ru> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/134000: [patch] ports-mgmt/portling: disable Perl warning for the case of empty PKGINSTALLVER Message-ID: <20090425132821.193C917112@amnesiac.at.no.dns> Resent-Message-ID: <200904251330.n3PDU4fR034845@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 134000 >Category: ports >Synopsis: [patch] ports-mgmt/portling: disable Perl warning for the case of empty PKGINSTALLVER >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Apr 25 13:30:04 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Eygene Ryabinkin >Release: FreeBSD 7.2-PRERELEASE amd64 >Organization: Code Labs >Environment: System: FreeBSD 7.2-PRERELEASE amd64 >Description: For the ports with empty PKGINSTALLVER and defined CONFLICTS portlint produces Perl warning: ----- Argument "" isn't numeric in numeric ge (>=) at /usr/local/bin/portlint line 2378. ----- >How-To-Repeat: Invoke portlint, e.g. for x11-drivers/xf86-input-synaptics. >Fix: The following patch will correct the things. Possibly, PORTREVISION should be bumped to delived the fixed port to all users who perform regular upgrades. --- portlint-chase-empty-PKGINSTALLVER.diff begins here --- >From a3bb60ea0afadd0199bf59b5e2d943853a3edefc Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin <rea-fbsd@codelabs.ru> Date: Sat, 25 Apr 2009 17:13:19 +0400 When the port lacks variable PKGINSTALLVER and has CONFLICTS, portlint invocation will spit Perl warning, ----- Argument "" isn't numeric in numeric ge (>=) at /usr/local/bin/portlint line 2378. ----- This patch adds a simple check for variable presence. Signed-off-by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> --- ports-mgmt/portlint/src/portlint.pl | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl index 20ccaf5..1aa8741 100644 --- a/ports-mgmt/portlint/src/portlint.pl +++ b/ports-mgmt/portlint/src/portlint.pl @@ -2375,7 +2375,8 @@ DIST_SUBDIR EXTRACT_ONLY print "OK: checking CONFLICTS.\n" if ($verbose); foreach my $conflict (split ' ', $makevar{CONFLICTS}) { my $selfconflict; - if ($makevar{PKGINSTALLVER} >= 20040125) { + if (length($makevar{PKGINSTALLVER}) && + $makevar{PKGINSTALLVER} >= 20040125) { $selfconflict = !system($pkg_version, '-T', $makevar{PKGNAME}, $conflict); } else { -- 1.6.2.4 --- portlint-chase-empty-PKGINSTALLVER.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090425132821.193C917112>