Add set pipefail in most framework scripts.
set pipefail changes the pipeline return status from being the return status of the last command to the last non 0 exit status of any command in the pipeline. This is needed to make sure all the commands in a pipeline did actually return a non 0 status and not only the last one. PR: 250723 Exp-run by: antoine Reviewed by: bapt Approved by: bapt Differential Revision: https://reviews.freebsd.org/D27007
This commit is contained in:
parent
dce2e8a539
commit
f916081e1c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=554893
22 changed files with 29 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
# c. Files in plist which are owned by dependencies/MTREEs
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
. ${SCRIPTSDIR}/functions.sh
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
# The PLIST_SUB feature can be disabled by setting PLIST_SUB_SED=
|
||||
# in environment.
|
||||
|
||||
set -o pipefail
|
||||
|
||||
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECK_LEFTOVERS}" ] && set -x
|
||||
|
||||
origin="$1"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
. ${dp_SCRIPTSDIR}/functions.sh
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# $FreeBSD$
|
||||
# Maintainer: portmgr@FreeBSD.org
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DIALOG4PORTS}" ] && set -x
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
. ${dp_SCRIPTSDIR}/functions.sh
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
# $FreeBSD$
|
||||
|
||||
set -o pipefail
|
||||
|
||||
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_FIND_LIB}" ] && set -x
|
||||
|
||||
if [ -z "${LIB_DIRS}" -o -z "${LOCALBASE}" ]; then
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
# /usr/local/bin/ssh -> /usr/local/lib/debug/usr/local/bin/ssh.debug
|
||||
LIB_DIR_PREFIX="${LOCALBASE}/lib/debug"
|
||||
|
||||
set -o pipefail
|
||||
|
||||
msg() {
|
||||
echo "====> $*"
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#
|
||||
# PLIST_SUB_SED helper to sort by longest value first.
|
||||
|
||||
set -o pipefail
|
||||
|
||||
awk '{
|
||||
while (match($0, /s![^!]*![^!]*!g;/)) {
|
||||
sedp=substr($0, RSTART, RLENGTH)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
# $FreeBSD$
|
||||
|
||||
set -o pipefail
|
||||
|
||||
if [ -z "${SCRIPTSDIR}" ]; then
|
||||
echo "Must set SCRIPTSDIR" >&2
|
||||
exit 1
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
# $FreeBSD$
|
||||
|
||||
set -o pipefail
|
||||
|
||||
if [ -z "${STAGEDIR}" -o -z "${PREFIX}" -o -z "${LOCALBASE}" ]; then
|
||||
echo "STAGEDIR, PREFIX, LOCALBASE required in environment." >&2
|
||||
exit 1
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# MAINTAINER: rust@FreeBSD.org
|
||||
# $FreeBSD$
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
if [ "${OPSYS}" != FreeBSD ] || [ "${OSVERSION}" -lt 1200000 ]; then
|
||||
exit 0
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
# if those targets modify source files (e.g. with sed). You may also
|
||||
# want to disable EXTRA_PATCHES as well if that is being used.
|
||||
|
||||
set -o pipefail
|
||||
|
||||
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_SMART_MAKEPATCH}" ] && set -x
|
||||
|
||||
if [ -z "${PATCHDIR}" -o -z "${PATCH_WRKSRC}" -o -z "${WRKDIR}" ]; then
|
||||
|
|
Loading…
Reference in a new issue