svn commit: r554139 - head/Mk/Scripts
Mathieu Arnold
mat at freebsd.org
Thu Nov 5 16:47:46 UTC 2020
On Thu, Nov 05, 2020 at 04:42:36PM +0000, Mathieu Arnold wrote:
> Author: mat
> Date: Thu Nov 5 16:42:35 2020
> New Revision: 554139
> URL: https://svnweb.freebsd.org/changeset/ports/554139
>
> Log:
> 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.
Oops, this is what happens when you don't check which branch you are on
when you commit.
I'll revert asap.
> Modified:
> head/Mk/Scripts/check-desktop-entries.sh (contents, props changed)
> head/Mk/Scripts/check-stagedir.sh (contents, props changed)
> head/Mk/Scripts/check-vulnerable.sh (contents, props changed)
> head/Mk/Scripts/check_leftovers.sh (contents, props changed)
> head/Mk/Scripts/checksum.sh (contents, props changed)
> head/Mk/Scripts/create-manifest.sh (contents, props changed)
> head/Mk/Scripts/depends-list.sh (contents, props changed)
> head/Mk/Scripts/desktop-categories.sh (contents, props changed)
> head/Mk/Scripts/dialog4ports.sh (contents, props changed)
> head/Mk/Scripts/do-depends.sh (contents, props changed)
> head/Mk/Scripts/do-fetch.sh (contents, props changed)
> head/Mk/Scripts/do-patch.sh (contents, props changed)
> head/Mk/Scripts/do-users-groups.sh (contents, props changed)
> head/Mk/Scripts/find-lib.sh (contents, props changed)
> head/Mk/Scripts/generate-symbols.sh (contents, props changed)
> head/Mk/Scripts/install-desktop-entries.sh (contents, props changed)
> head/Mk/Scripts/makesum.sh (contents, props changed)
> head/Mk/Scripts/plist_sub_sed_sort.sh (contents, props changed)
> head/Mk/Scripts/ports_env.sh (contents, props changed)
> head/Mk/Scripts/qa.sh (contents, props changed)
> head/Mk/Scripts/rust-compat11-canary.sh (contents, props changed)
> head/Mk/Scripts/smart_makepatch.sh (contents, props changed)
>
> Modified: head/Mk/Scripts/check-desktop-entries.sh
> ==============================================================================
> --- head/Mk/Scripts/check-desktop-entries.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/check-desktop-entries.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -4,6 +4,7 @@
> # MAINTAINER: portmgr at FreeBSD.org
>
> set -e
> +set pipefail
>
> . "${dp_SCRIPTSDIR}/functions.sh"
>
>
> Modified: head/Mk/Scripts/check-stagedir.sh
> ==============================================================================
> --- head/Mk/Scripts/check-stagedir.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/check-stagedir.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -12,6 +12,7 @@
> # c. Files in plist which are owned by dependencies/MTREEs
>
> set -e
> +set pipefail
>
> . ${SCRIPTSDIR}/functions.sh
>
>
> Modified: head/Mk/Scripts/check-vulnerable.sh
> ==============================================================================
> --- head/Mk/Scripts/check-vulnerable.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/check-vulnerable.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -4,6 +4,7 @@
> # MAINTAINER: portmgr at FreeBSD.org
>
> set -e
> +set pipefail
>
> . "${dp_SCRIPTSDIR}/functions.sh"
>
>
> Modified: head/Mk/Scripts/check_leftovers.sh
> ==============================================================================
> --- head/Mk/Scripts/check_leftovers.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/check_leftovers.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -23,6 +23,8 @@
> # The PLIST_SUB feature can be disabled by setting PLIST_SUB_SED=
> # in environment.
>
> +set pipefail
> +
> [ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECK_LEFTOVERS}" ] && set -x
>
> origin="$1"
>
> Modified: head/Mk/Scripts/checksum.sh
> ==============================================================================
> --- head/Mk/Scripts/checksum.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/checksum.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -4,6 +4,7 @@
> # MAINTAINER: portmgr at FreeBSD.org
>
> set -e
> +set pipefail
>
> . "${dp_SCRIPTSDIR}/functions.sh"
>
>
> Modified: head/Mk/Scripts/create-manifest.sh
> ==============================================================================
> --- head/Mk/Scripts/create-manifest.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/create-manifest.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -4,6 +4,7 @@
> # MAINTAINER: portmgr at FreeBSD.org
>
> set -e
> +set pipefail
>
> . "${dp_SCRIPTSDIR}/functions.sh"
>
>
> Modified: head/Mk/Scripts/depends-list.sh
> ==============================================================================
> --- head/Mk/Scripts/depends-list.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/depends-list.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -3,6 +3,7 @@
> # $FreeBSD$
>
> set -e
> +set pipefail
>
> . ${dp_SCRIPTSDIR}/functions.sh
>
>
> Modified: head/Mk/Scripts/desktop-categories.sh
> ==============================================================================
> --- head/Mk/Scripts/desktop-categories.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/desktop-categories.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -4,6 +4,7 @@
> # MAINTAINER: portmgr at FreeBSD.org
>
> set -e
> +set pipefail
>
> . "${dp_SCRIPTSDIR}/functions.sh"
>
>
> Modified: head/Mk/Scripts/dialog4ports.sh
> ==============================================================================
> --- head/Mk/Scripts/dialog4ports.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/dialog4ports.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -2,6 +2,7 @@
> # $FreeBSD$
> # Maintainer: portmgr at FreeBSD.org
> set -e
> +set pipefail
>
> [ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DIALOG4PORTS}" ] && set -x
>
>
> Modified: head/Mk/Scripts/do-depends.sh
> ==============================================================================
> --- head/Mk/Scripts/do-depends.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/do-depends.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -4,6 +4,7 @@
> # MAINTAINER: portmgr at FreeBSD.org
>
> set -e
> +set pipefail
>
> . ${dp_SCRIPTSDIR}/functions.sh
>
>
> Modified: head/Mk/Scripts/do-fetch.sh
> ==============================================================================
> --- head/Mk/Scripts/do-fetch.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/do-fetch.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -4,6 +4,7 @@
> # MAINTAINER: portmgr at FreeBSD.org
>
> set -e
> +set pipefail
>
> . "${dp_SCRIPTSDIR}/functions.sh"
>
>
> Modified: head/Mk/Scripts/do-patch.sh
> ==============================================================================
> --- head/Mk/Scripts/do-patch.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/do-patch.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -4,6 +4,7 @@
> # MAINTAINER: portmgr at FreeBSD.org
>
> set -e
> +set pipefail
>
> . "${dp_SCRIPTSDIR}/functions.sh"
>
>
> Modified: head/Mk/Scripts/do-users-groups.sh
> ==============================================================================
> --- head/Mk/Scripts/do-users-groups.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/do-users-groups.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -4,6 +4,7 @@
> # MAINTAINER: portmgr at FreeBSD.org
>
> set -e
> +set pipefail
>
> . "${dp_SCRIPTSDIR}/functions.sh"
>
>
> Modified: head/Mk/Scripts/find-lib.sh
> ==============================================================================
> --- head/Mk/Scripts/find-lib.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/find-lib.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -2,6 +2,8 @@
> # MAINTAINER: portmgr at FreeBSD.org
> # $FreeBSD$
>
> +set pipefail
> +
> [ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_FIND_LIB}" ] && set -x
>
> if [ -z "${LIB_DIRS}" -o -z "${LOCALBASE}" ]; then
>
> Modified: head/Mk/Scripts/generate-symbols.sh
> ==============================================================================
> --- head/Mk/Scripts/generate-symbols.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/generate-symbols.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -9,6 +9,8 @@
> # /usr/local/bin/ssh -> /usr/local/lib/debug/usr/local/bin/ssh.debug
> LIB_DIR_PREFIX="${LOCALBASE}/lib/debug"
>
> +set pipefail
> +
> msg() {
> echo "====> $*"
> }
>
> Modified: head/Mk/Scripts/install-desktop-entries.sh
> ==============================================================================
> --- head/Mk/Scripts/install-desktop-entries.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/install-desktop-entries.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -4,6 +4,7 @@
> # MAINTAINER: portmgr at FreeBSD.org
>
> set -e
> +set pipefail
>
> . "${dp_SCRIPTSDIR}/functions.sh"
>
>
> Modified: head/Mk/Scripts/makesum.sh
> ==============================================================================
> --- head/Mk/Scripts/makesum.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/makesum.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -4,6 +4,7 @@
> # MAINTAINER: portmgr at FreeBSD.org
>
> set -e
> +set pipefail
>
> . "${dp_SCRIPTSDIR}/functions.sh"
>
>
> Modified: head/Mk/Scripts/plist_sub_sed_sort.sh
> ==============================================================================
> --- head/Mk/Scripts/plist_sub_sed_sort.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/plist_sub_sed_sort.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -5,6 +5,8 @@
> #
> # PLIST_SUB_SED helper to sort by longest value first.
>
> +set pipefail
> +
> awk '{
> while (match($0, /s![^!]*![^!]*!g;/)) {
> sedp=substr($0, RSTART, RLENGTH)
>
> Modified: head/Mk/Scripts/ports_env.sh
> ==============================================================================
> --- head/Mk/Scripts/ports_env.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/ports_env.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -3,6 +3,8 @@
> # MAINTAINER: portmgr at FreeBSD.org
> # $FreeBSD$
>
> +set pipefail
> +
> if [ -z "${SCRIPTSDIR}" ]; then
> echo "Must set SCRIPTSDIR" >&2
> exit 1
>
> Modified: head/Mk/Scripts/qa.sh
> ==============================================================================
> --- head/Mk/Scripts/qa.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/qa.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -2,6 +2,8 @@
> # MAINTAINER: portmgr at FreeBSD.org
> # $FreeBSD$
>
> +set pipefail
> +
> if [ -z "${STAGEDIR}" -o -z "${PREFIX}" -o -z "${LOCALBASE}" ]; then
> echo "STAGEDIR, PREFIX, LOCALBASE required in environment." >&2
> exit 1
>
> Modified: head/Mk/Scripts/rust-compat11-canary.sh
> ==============================================================================
> --- head/Mk/Scripts/rust-compat11-canary.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/rust-compat11-canary.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -2,6 +2,7 @@
> # MAINTAINER: rust at FreeBSD.org
> # $FreeBSD$
> set -eu
> +set pipefail
>
> if [ "${OPSYS}" != FreeBSD ] || [ "${OSVERSION}" -lt 1200000 ]; then
> exit 0
>
> Modified: head/Mk/Scripts/smart_makepatch.sh
> ==============================================================================
> --- head/Mk/Scripts/smart_makepatch.sh Thu Nov 5 16:18:48 2020 (r554138)
> +++ head/Mk/Scripts/smart_makepatch.sh Thu Nov 5 16:42:35 2020 (r554139)
> @@ -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 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
>
--
Mathieu Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-all/attachments/20201105/2059dbc5/attachment.sig>
More information about the svn-ports-all
mailing list