From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Sep 24 23:20:02 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 640041065679 for ; Thu, 24 Sep 2009 23:20:02 +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 37CE08FC16 for ; Thu, 24 Sep 2009 23:20:02 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8ONK2EV042957 for ; Thu, 24 Sep 2009 23:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8ONK2VU042956; Thu, 24 Sep 2009 23:20:02 GMT (envelope-from gnats) Resent-Date: Thu, 24 Sep 2009 23:20:02 GMT Resent-Message-Id: <200909242320.n8ONK2VU042956@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 Larkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDB5A1065670 for ; Thu, 24 Sep 2009 23:14:08 +0000 (UTC) (envelope-from glarkin@sourcehosting.net) Received: from mail1.sourcehosting.net (113901-app1.sourcehosting.net [72.32.213.11]) by mx1.freebsd.org (Postfix) with ESMTP id A7C6B8FC1E for ; Thu, 24 Sep 2009 23:14:08 +0000 (UTC) Received: from 68-189-245-235.dhcp.oxfr.ma.charter.com ([68.189.245.235] helo=cube.entropy.prv) by mail1.sourcehosting.net with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1MqxVi-00032v-Ly for FreeBSD-gnats-submit@freebsd.org; Thu, 24 Sep 2009 19:14:07 -0400 Received: from fbsd70.entropy.prv (fbsd70.entropy.prv [192.168.1.14]) by cube.entropy.prv (Postfix) with ESMTP id B53E03507B6E for ; Thu, 24 Sep 2009 19:14:02 -0400 (EDT) Received: from fbsd70.entropy.prv (localhost [127.0.0.1]) by fbsd70.entropy.prv (8.14.2/8.14.2) with ESMTP id n8ONClAT015213 for ; Thu, 24 Sep 2009 19:12:47 -0400 (EDT) (envelope-from glarkin@fbsd70.entropy.prv) Received: (from glarkin@localhost) by fbsd70.entropy.prv (8.14.2/8.14.2/Submit) id n8ONClro015212; Thu, 24 Sep 2009 19:12:47 -0400 (EDT) (envelope-from glarkin) Message-Id: <200909242312.n8ONClro015212@fbsd70.entropy.prv> Date: Thu, 24 Sep 2009 19:12:47 -0400 (EDT) From: Greg Larkin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/139121: [PATCH] Correct a 'permission denied' error in rmport and other cleanups X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Greg Larkin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2009 23:20:02 -0000 >Number: 139121 >Category: ports >Synopsis: [PATCH] Correct a 'permission denied' error in rmport and other cleanups >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: Thu Sep 24 23:20:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Greg Larkin >Release: FreeBSD 7.0-RELEASE i386 >Organization: The FreeBSD Project >Environment: System: FreeBSD fbsd70.entropy.prv 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: I recently attempted to use rmport to remove the www/cakephp and www/cakephp-devel ports after they were repomoved. During the script execution, a diff file is generated and should be shown to the user before the final commit. I kept receiving an error message like "/tmp/rmport.XXXXX/diff: permission denied". This was caused by the script attempting to execute the return value of the "diff" function (a temporary filename containing the diff output). [1] I also added some flags to the cvs update to control its behavior regardless of the contents of the user's .cvsrc file. In my configuration, the cvs update command started building the entire ports tree because I have "update -dP" in my .cvsrc. [2] >How-To-Repeat: [1] Attempt to remove a port [2] Add "update -dP" to ~/.cvsrc and attempt to remove a port >Fix: --- rmport.diff begins here --- Index: Tools/scripts/rmport =================================================================== RCS file: /home/pcvs/ports/Tools/scripts/rmport,v retrieving revision 1.19 diff -u -r1.19 rmport --- Tools/scripts/rmport 19 Jun 2008 22:09:01 -0000 1.19 +++ Tools/scripts/rmport 24 Sep 2009 23:04:15 -0000 @@ -390,6 +390,7 @@ ${PCVS} diff -u ports > ${diffout} 2>&1 || : read -p "hit to view cvs diff output" dummy + ${PAGER:-less} ${diffout} # give this to the outside world so it can be showed to the committer # and removed when we are done @@ -400,7 +401,7 @@ commit() { log "running cvs update" - ${PCVS} up ports 2>&1 |${PAGER:-less} + ${PCVS} -fnq up ports 2>&1 |${PAGER:-less} answer=`ask "do you want to commit?"` @@ -528,7 +529,7 @@ # the diff afterwards answer=y while [ "${answer}" = "y" ] ; do - diffout=`diff` + diffout=diff # EDITOR instead of PAGER because vim has nice syntax highlighting ;-) ${EDITOR} ${diffout} --- rmport.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: