From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jun 8 02:20:03 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 01CEC16A468 for ; Fri, 8 Jun 2007 02:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id D46EA13C484 for ; Fri, 8 Jun 2007 02:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l582K2Lj038666 for ; Fri, 8 Jun 2007 02:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l582K2Zc038665; Fri, 8 Jun 2007 02:20:02 GMT (envelope-from gnats) Resent-Date: Fri, 8 Jun 2007 02:20:02 GMT Resent-Message-Id: <200706080220.l582K2Zc038665@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, parv@pair.com Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF28E16A400 for ; Fri, 8 Jun 2007 02:11:30 +0000 (UTC) (envelope-from parv@chvlva.adelphia.net) Received: from mta11.adelphia.net (mta11.adelphia.net [68.168.78.205]) by mx1.freebsd.org (Postfix) with ESMTP id A658913C45D for ; Fri, 8 Jun 2007 02:11:30 +0000 (UTC) (envelope-from parv@chvlva.adelphia.net) Received: from default.chvlva.adelphia.net ([24.126.17.68]) by mta11.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20070608021130.WXBB13315.mta11.adelphia.net@default.chvlva.adelphia.net> for ; Thu, 7 Jun 2007 22:11:30 -0400 Received: by default.chvlva.adelphia.net (Postfix, from userid 1000) id 7E03DB6FC; Thu, 7 Jun 2007 22:12:12 -0400 (EDT) Message-Id: <20070608021212.7E03DB6FC@default.chvlva.adelphia.net> Date: Thu, 7 Jun 2007 22:12:12 -0400 (EDT) From: parv@pair.com To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/113468: print/acroread7 - PATCH (dirty workaround) - acroread shell script produces error when $version is empty 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: Fri, 08 Jun 2007 02:20:03 -0000 >Number: 113468 >Category: ports >Synopsis: print/acroread7 - PATCH (dirty workaround) - acroread shell script produces error when $version is empty >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: Fri Jun 08 02:20:02 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Parv >Release: FreeBSD 6.2-STABLE i386 >Organization: >Environment: System: FreeBSD holestein.holy.cow 6.2-STABLE FreeBSD 6.2-STABLE #1: Fri May 25 16:16:36 EDT 2007 root@holestein.holy.cow:/work/obj/misc/src-6/sys/BOVINE-T42.6 i386 Installed version is acroread7-7.0.9_1,1. Linux ports (base & such) have been recompiled & reinstalled after installing xorg 7.2. My interactive shell is zsh 4.3.2_1. >Description: acroread (shell script) produces the following message ... /misc/local/Adobe/Acrobat7.0/ENU/bin/acroread: line 486: [: -ge: unary operator expected ... which does not prevent the actual program to be launched). Running with -x option around $version assignment ... 480 set -x 481 version=`get_gtk_file_ver "$ifile"` 482 set +x ... produces ... ++ get_gtk_file_ver /misc/local/lib/libgtk-x11-2.0.so ++ '[' -f /misc/local/lib/libgtk-x11-2.0.so ']' ++ '[' -h /misc/local/lib/libgtk-x11-2.0.so ']' +++ readlink /misc/local/lib/libgtk-x11-2.0.so ++++ /bin/pwd +++ OLDPWD=/misc/home/parv +++ lfile=/misc/local/lib/libgtk-x11-2.0.so +++ '[' -h /misc/local/lib/libgtk-x11-2.0.so -a -f /misc/local/lib/libgtk-x11-2.0.so ']' ++++ dirname /misc/local/lib/libgtk-x11-2.0.so +++ CWD=/misc/local/lib ++++ expr /misc/local/lib : '\.\.' +++ '[' 0 = 2 ']' ++++ basename /misc/local/lib/libgtk-x11-2.0.so +++ lfile=libgtk-x11-2.0.so +++ cd /misc/local/lib ++++ /bin/ls -l libgtk-x11-2.0.so ++++ sed 's/^.*-> *\(.*\) *$/\1/' +++ lfile=libgtk-x11-2.0.so.0 +++ '[' -h libgtk-x11-2.0.so.0 -a -f libgtk-x11-2.0.so.0 ']' +++ '[' -f libgtk-x11-2.0.so.0 ']' ++++ dirname libgtk-x11-2.0.so.0 +++ CWD=. ++++ basename libgtk-x11-2.0.so.0 +++ lfile=libgtk-x11-2.0.so.0 ++++ expr . : '\.\.' +++ '[' 0 = 2 ']' +++ cd . ++++ /bin/pwd +++ echo /misc/local/lib/libgtk-x11-2.0.so.0 +++ cd /misc/local/lib +++ return 0 ++ ifile=/misc/local/lib/libgtk-x11-2.0.so.0 ++ '[' 0 -eq 1 ']' +++ basename /misc/local/lib/libgtk-x11-2.0.so.0 ++ mfile=libgtk-x11-2.0.so.0 ++ echo libgtk-x11-2.0.so.0 ++ grep -q 'libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\).\([0-9]*\)' ++ '[' 1 -ne 0 ']' ++ return 1 + version= + set +x /misc/local/Adobe/Acrobat7.0/ENU/bin/acroread: line 488: [: -ge: unary operator expected >How-To-Repeat: Try to run above acroread version. >Fix: This is only a dirty workaround around the actual problem, but should be considered to make the script robust ... --- acroread.old Fri Jan 5 14:56:39 2007 +++ acroread Thu Jun 7 16:59:05 2007 @@ -479,6 +479,15 @@ for ifile in `/sbin/ldconfig -p|grep "libgtk-x11-2.0.so$"|sed 's/.*[ \t]*=>[ \t]*\(.*\)/\1/g' 2>/dev/null`; do version=`get_gtk_file_ver "$ifile"` + case "$version" in + "" ) + return 0 + ;; + + *) + ;; + esac + while [ ${#version} -gt ${#base_version} ]; do base_version="${base_version}0" done >Release-Note: >Audit-Trail: >Unformatted: