Date: Sat, 27 Apr 2013 10:34:13 +0900 (JST) From: TAKATSU Tomonari <tota@FreeBSD.org> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/178193: [PATCH] Tools/scripts/addport: Fix behavior with -c option Message-ID: <20130427013413.2F9D8B82F@rtfm.jp> Resent-Message-ID: <201304270150.r3R1o0Ma044194@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 178193 >Category: ports >Synopsis: [PATCH] Tools/scripts/addport: Fix behavior with -c option >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Apr 27 01:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: TAKATSU Tomonari >Release: FreeBSD 8.2-RELEASE-p9 amd64 >Organization: none (private) >Environment: System: FreeBSD photon.local.lan 8.2-RELEASE-p9 FreeBSD 8.2-RELEASE-p9 #0: Mon Jun 11 23:00:11 UTC 2012 >Description: addport with -c option won't terminate normally because there is a wrong logical operator between system() and errx(), and missing $commitfile as shown in following patch. Maintainer (crees@FreeBSD.org) is cc'd. >How-To-Repeat: Run addport with -c option. >Fix: Index: Tools/scripts/addport =================================================================== --- Tools/scripts/addport (revision 316532) +++ Tools/scripts/addport (working copy) @@ -251,10 +251,11 @@ # Do commitfile checking but only if the user did not request automatic filling. if (!$autofill) { if (-f $c) { - system("$mv $c $tmpdir/commitfile") or errx(1, "Oops, can't move commitfile!"); + system("$mv $c $tmpdir/commitfile") && errx(1, "Oops, can't move commitfile!"); print "\nRemember, you asked to use a commit file to read for the commit log.\n"; print "This means you'll get a message saying the log message was unchanged or\n"; print "not specified. Just tell it to continue and it will be committed.\n\n"; + $commitfile = "--file $tmpdir/commitfile"; } } else { ## Set up the autofill file. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130427013413.2F9D8B82F>