Check-in [7243a6f3d1]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:parallel_exec: Fix to not disable 'set -e' in child cmd due to || This set -e juggling is to keep this function portable to other scripts that may or may not be running set -e. This fixes compute_deps() finding invalid port origins and not properly stopping before the build starts, which can lead to infinite loops
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7243a6f3d164eea0e63e6cdefb7bcf7f9674ef39
User & Date: bdrewery 2013-06-11 18:51:27
Context
2013-06-12
13:14
Be a bit more strict about leftovers in /var/db/, hopefully not breaking too much things. check-in: 492f7e6c9f user: antoine tags: trunk
2013-06-11
18:51
parallel_exec: Fix to not disable 'set -e' in child cmd due to || This set -e juggling is to keep this function portable to other scripts that may or may not be running set -e. This fixes compute_deps() finding invalid port origins and not properly stopping before the build starts, which can lead to infinite loops check-in: 7243a6f3d1 user: bdrewery tags: trunk
2013-06-04
11:58
make_index: Remove unneeded include Submitted by: David Demelier check-in: e38d69a149 user: bdrewery tags: trunk
Changes

Changes to src/share/poudriere/common.sh.

2220
2221
2222
2223
2224
2225
2226


2227












2228


2229
2230

2231
2232
2233
2234
2235
2236
2237

	echo $porttesting
}

parallel_exec() {
	local cmd="$1"
	local ret=0


	shift 1












	${cmd} "$@" || ret=1


	echo >&6 || :
	exit ${ret}

}

parallel_start() {
	local fifo

	if [ -n "${MASTERMNT}" ]; then
		fifo=${MASTERMNT}/poudriere/parallel.pipe







>
>

>
>
>
>
>
>
>
>
>
>
>
>
|
>
>


>







2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254

	echo $porttesting
}

parallel_exec() {
	local cmd="$1"
	local ret=0
	local - # Make `set +e` local
	local errexit=0
	shift 1

	# Disable -e so that the actual execution failing does not
	# return early and prevent notifying the FIFO that the
	# exec is done
	case $- in *e*) errexit=1;; esac
	set +e
	(
		# Do still cause the actual command to return
		# non-zero if it has any failures, if caller
		# was set -e as well. Using 'if cmd' or 'cmd || '
		# here would disable set -e in the cmd execution
		[ $errexit -eq 1 ] && set -e
		${cmd} "$@"
	)
	ret=$?
	echo >&6 || :
	exit ${ret}
	# set -e will be restored by 'local -'
}

parallel_start() {
	local fifo

	if [ -n "${MASTERMNT}" ]; then
		fifo=${MASTERMNT}/poudriere/parallel.pipe