From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Nov 7 18:10:03 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 90E121065676 for ; Sat, 7 Nov 2009 18:10:03 +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 55DEE8FC1B for ; Sat, 7 Nov 2009 18:10:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nA7IA3JC086720 for ; Sat, 7 Nov 2009 18:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nA7IA3Mj086719; Sat, 7 Nov 2009 18:10:03 GMT (envelope-from gnats) Resent-Date: Sat, 7 Nov 2009 18:10:03 GMT Resent-Message-Id: <200911071810.nA7IA3Mj086719@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, "Akinori MUSHA" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF79B106566B for ; Sat, 7 Nov 2009 18:07:36 +0000 (UTC) (envelope-from knu@FreeBSD.org) Received: from mail.musha.org (daemon.musha.org [210.189.104.8]) by mx1.freebsd.org (Postfix) with ESMTP id C4FC78FC26 for ; Sat, 7 Nov 2009 18:07:36 +0000 (UTC) Received: from daemon.musha.org (daemon.local.idaemons.org [192.168.1.1]) by mail.musha.org (Postfix) with ESMTP id E2C5313E6AB3 for ; Sun, 8 Nov 2009 02:48:04 +0900 (JST) Message-Id: <86639mns4r.knu@FreeBSD.org> Date: Sun, 08 Nov 2009 02:48:04 +0900 From: "Akinori MUSHA" To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: ports/140364: ports-mgmt/portupgrade-devel: #! line substitution is broken 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, 07 Nov 2009 18:10:03 -0000 Note: There was a bad value `non-critical<[' for the field `>Severity:'. It was set to the default value of `serious'. >Number: 140364 >Category: ports >Synopsis: ports-mgmt/portupgrade-devel: #! line substitution is broken >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 Nov 07 18:10:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: "Akinori MUSHA" >Release: FreeBSD 7.2-STABLE amd64 >Organization: N/A >Environment: FreeBSD daemon.musha.org 7.2-STABLE FreeBSD 7.2-STABLE #10: Mon Sep 28 01:42:28 JST 2009 root@daemon.musha.org:/var/cache/obj/usr/src/sys/DAEMON amd64 >Description: #! line substitution in portupgrade-devel is broken. >How-To-Repeat: Install portupgrade-devel and run `head -n1 /usr/local/sbin/portupgrade'. If it shows `#!/usr/bin/env ruby', the line has not been properly processed. >Fix: sub() is not equivalent to $_.sub() but $_.sub!(). Just back out the modification as follows: --- bin/Makefile.orig 2008-07-17 09:26:38.000000000 +0900 +++ bin/Makefile 2009-11-08 02:31:36.000000000 +0900 @@ -28,7 +28,7 @@ ${script}: ${script:T} ${RUBY} -pe ' \ if $$. == 1; \ if /^#!/; \ - $$_.sub(/^#!\s*\S*(\benv\s+)?\bruby/, "#!${RUBY}"); \ + sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!${RUBY}"; \ else; \ $$_ = "#!${RUBY}\n" + $$_; \ end; \ Or use the destructive method: --- bin/Makefile.orig 2008-07-17 09:26:38.000000000 +0900 +++ bin/Makefile 2009-11-08 02:31:36.000000000 +0900 @@ -28,7 +28,7 @@ ${script}: ${script:T} ${RUBY} -pe ' \ if $$. == 1; \ if /^#!/; \ - $$_.sub(/^#!\s*\S*(\benv\s+)?\bruby/, "#!${RUBY}"); \ + $$_.sub!(/^#!\s*\S*(\benv\s+)?\bruby/, "#!${RUBY}"); \ else; \ $$_ = "#!${RUBY}\n" + $$_; \ end; \ -- Akinori MUSHA / http://akinori.org/ >Release-Note: >Audit-Trail: >Unformatted: