From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jul 21 09:50:01 2008 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 7B5F51065676 for ; Mon, 21 Jul 2008 09: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 482628FC29 for ; Mon, 21 Jul 2008 09: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.2/8.14.2) with ESMTP id m6L9o1eP021963 for ; Mon, 21 Jul 2008 09:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6L9o1lv021962; Mon, 21 Jul 2008 09:50:01 GMT (envelope-from gnats) Resent-Date: Mon, 21 Jul 2008 09:50:01 GMT Resent-Message-Id: <200807210950.m6L9o1lv021962@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, Trevor Johns Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC048106564A for ; Mon, 21 Jul 2008 09:40:42 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id AC0A28FC08 for ; Mon, 21 Jul 2008 09:40:42 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m6L9egUk071022 for ; Mon, 21 Jul 2008 09:40:42 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m6L9eg18071021; Mon, 21 Jul 2008 09:40:42 GMT (envelope-from nobody) Message-Id: <200807210940.m6L9eg18071021@www.freebsd.org> Date: Mon, 21 Jul 2008 09:40:42 GMT From: Trevor Johns To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/125823: [PATCH] Ports-mgmt/portupgrade does not use custom ECHO_MSG handler if defined 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: Mon, 21 Jul 2008 09:50:01 -0000 >Number: 125823 >Category: ports >Synopsis: [PATCH] Ports-mgmt/portupgrade does not use custom ECHO_MSG handler if defined >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 21 09:50:00 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Trevor Johns >Release: 6.3-RELEASE >Organization: Google >Environment: FreeBSD timon.usc.edu 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 16 04:18:52 UTC 2008 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: The ports-mgmt/portupgrade tool does not check to see if a given port has defined a custom value for the ECHO_MSG variable when outputing the reason that port has been marked as IGNORE. Since the value used for ECHO_MSG influences the content of the IGNORE variable (for example, ECHO_MSG may be set to /usr/bin/printf, allowing escape codes in ECHO_MSG), blindly outputting the contents of IGNORE can cause ugly or unreadable output. >How-To-Repeat: Run portupgrade such that it would try to rebuild java/jdk16 without first downloading tzupdater-1_3_6-2008c.zip. The following will be output (note presence of "\n" in output): ** Port marked as IGNORE: java/jdk16: :\n Due to licensing restrictions, certain files must be fetched manually.\n\n Please open http://java.sun.com/javase/downloads/index.jsp\n in a web browser and follow the \"Download\" link for\n \"JDK US DST Timezone Update Tool - 1_3_6\" to obtain the\n time zone update file, tzupdater-1_3_6-2008c.zip.\n\n Please place the downloaded file(s) in /usr/ports/distfiles \n and restart the build.\n\n >Fix: Patch attached with submission follows: Fix portupgrade so that custom ECHO_MSG settings are taken into account. Since ports that use this tend to be a bit more creative with their formatting, this change also tries to correct for that behavior. Patch by: Trevor Johns Index: bin/portupgrade =================================================================== RCS file: /cvsroot/portupgrade/pkgtools/bin/portupgrade,v retrieving revision 1.61 diff -r1.61 portupgrade 1453c1453 < output = `cd #{portdir} && #{shelljoin(*cmdargs)} -V PKGNAME -V IGNORE -V NO_IGNORE 2>&1`.scan(/.*\n/) --- > output = `cd #{portdir} && #{shelljoin(*cmdargs)} -V PKGNAME -V IGNORE -V NO_IGNORE -V ECHO_MSG 2>&1`.scan(/.*\n/) 1455c1455 < if output.size != 3 --- > if output.size != 4 1462a1463 > echo_msg = output[3].chomp 1465a1467,1470 > ignore = `#{echo_msg} "#{ignore}"` > # Some packages ouptut a ':\n ' to try to look nice when using the normal > # ports build process. That looks really bad here, so we undo that. > ignore.slice!(0..2) if (ignore.match /^:\n /) >Release-Note: >Audit-Trail: >Unformatted: