ports/178193: [PATCH] Tools/scripts/addport: Fix behavior with -c option

TAKATSU Tomonari tota at FreeBSD.org
Sat Apr 27 01:50:00 UTC 2013


>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 at 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:


More information about the freebsd-ports-bugs mailing list