Subject: toolchain/17337: -d overrides -R in build.sh if specified at the end
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jmmv@hispabsd.org>
List: netbsd-bugs
Date: 06/20/2002 21:05:58
>Number:         17337
>Category:       toolchain
>Synopsis:       -d overrides -R in build.sh if specified at the end
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 20 12:06:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Julio Merino
>Release:        NetBSD 1.6A
>Organization:
HispaBSD
>Environment:
	
	
System: NetBSD darkstar.local 1.6A NetBSD 1.6A (DARKSTAR) #0: Thu Jun 13 14:08:33 CEST 2002 jmmv@darkstar.local:/usr/src/sys/arch/i386/compile/DARKSTAR i386
Architecture: i386
Machine: i386
>Description:
	build.sh processes target specification in command line sequentially,
	so the last specified "target" takes precedence. It seems more logical
	to me that the most global target is the one that should be executed,
	regardless of how many parameters has specified the user.

>How-To-Repeat:
	If you do './build.sh -R /home/where -d' it won't build a release;
	this will simply build a distribution.
>Fix:

Index: build.sh
===================================================================
RCS file: /cvsroot/basesrc/build.sh,v
retrieving revision 1.62
diff -u -u -r1.62 build.sh
--- build.sh	2002/06/10 14:08:05	1.62
+++ build.sh	2002/06/20 19:00:21
@@ -152,7 +152,9 @@
 
 	-b)	do_buildsystem=false;;
 
-	-d)	buildtarget=distribution;;
+	-d)	if [ "$buildtarget" != "release" ]; then
+			buildtarget=distribution
+		fi;;
 
 	-j)	eval $optargcmd
 		parallel="-j $OPTARG";;
>Release-Note:
>Audit-Trail:
>Unformatted: