diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2023-07-10 12:36:30 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2023-07-10 12:36:30 +0200 |
commit | db556ea7276513946889b4229e0c1638f3aea8bb (patch) | |
tree | de7f783072b7056a9a1104d21b5f68495a9a8038 | |
parent | f1ae1e2bb49adcc8a4046e7398d2a767f9ce9a3c (diff) | |
download | ptxdist-stable/ptxdist-2023.07.x.tar.gz ptxdist-stable/ptxdist-2023.07.x.tar.xz |
Revert "add support for nested PTXdist execution"ptxdist-2023.07.1stable/ptxdist-2023.07.x
This reverts commit 5169ae99daf821ef820f1de635b8e93634ed061f.
-rwxr-xr-x | bin/ptxdist | 10 | ||||
-rw-r--r-- | rules/post/ptxd_make_world_nested.make | 15 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_nested.sh | 81 |
3 files changed, 2 insertions, 104 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index 511af3be9..393f3bbe1 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -2227,11 +2227,10 @@ setup_env() { whitelist="${*}" whitelist="${whitelist:+|}${whitelist// /|}" - # Any change here should be done in ptxd_make_nested_ptxdist() as well unset $({ export -p | sed -n 's/^declare -x \([^=]*\).*$/\1/p' export -fp | sed -n 's/^declare -fx \([^=]*\).*$/\1/p' - } | grep -E -v "^(PTXDIST_PTXRC|PTX_AUTOBUILD_DESTDIR|PTXDIST_PLATFORMDIR|CCACHE_.*|PWD|HOME|USER|PATH|TERM|COLUMNS|LINES|DISPLAY|TMPDIR|KCONFIG_ALLCONFIG|KCONFIG_SEED|http_proxy|https_proxy|ftp_proxy|no_proxy${whitelist})$") + } | grep -E -v "^(PTXDIST_PTXRC|PTX_AUTOBUILD_DESTDIR|CCACHE_.*|PWD|HOME|USER|PATH|TERM|COLUMNS|LINES|DISPLAY|TMPDIR|KCONFIG_ALLCONFIG|KCONFIG_SEED|http_proxy|https_proxy|ftp_proxy|no_proxy${whitelist})$") ######## the environment is clean now ######## @@ -2513,7 +2512,7 @@ setup_platform_continue_with_broken_config() # "*DIR" correct directory definitions # setup_platform() { - local platform platform_version project project_version old_platformdir + local platform platform_version project project_version # ptxd_get_ptxconf's return value is platform="$(ptxd_get_ptxconf PTXCONF_PLATFORM)" || [ ${?} -eq 1 ] && @@ -2523,7 +2522,6 @@ setup_platform() { # remove space and "(" ")" project_version="${project_version//[ \(\)]/_}" - old_platformdir="${PTXDIST_PLATFORMDIR}" if [ -n "${platform}" ]; then PTXDIST_PLATFORMDIR="${PTXDIST_WORKSPACE}/platform-${platform}${platform_version}" PTXDIST_PLATFORMSUFFIX=".${platform}" @@ -2532,10 +2530,6 @@ setup_platform() { PTXDIST_PLATFORMSUFFIX="" fi - if [ "${old_platformdir}" = "${PTXDIST_PLATFORMDIR}" ]; then - ptxd_bailout "Nested PTXdist execution for the same platform is not allowed!" - fi - # reread vars with correct PTXDIST_PLATFORMDIR source "${SCRIPTSDIR}/ptxdist_vars.sh" || return diff --git a/rules/post/ptxd_make_world_nested.make b/rules/post/ptxd_make_world_nested.make deleted file mode 100644 index 70f568d78..000000000 --- a/rules/post/ptxd_make_world_nested.make +++ /dev/null @@ -1,15 +0,0 @@ -# -*-makefile-*- -# -# Copyright (C) 2023 by Michael Olbrich <m.olbrich@pengutronix.de> -# -# For further information about the PTXdist project and license conditions -# see the README file. -# - -world/nested = \ - +$(call world/env, $(1)) \ - pkg_workspace="$(call ptx/escape,$($(strip $(1))_WORKSPACE))" \ - ptxd_make_nested_ptxdist $(2) - - -# vim: syntax=make: diff --git a/scripts/lib/ptxd_make_nested.sh b/scripts/lib/ptxd_make_nested.sh deleted file mode 100644 index cae12bceb..000000000 --- a/scripts/lib/ptxd_make_nested.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2023 by Michael Olbrich <m.olbrich@pengutronix.de> -# -# For further information about the PTXdist project and license conditions -# see the README file. -# - -ptxd_make_nested_ptxdist_impl() { - # close all unneeded fds. The nested PTXdist will open its own fds. - exec 9>&- - exec {PTXDIST_FD_STDOUT}>&- - exec {PTXDIST_FD_STDERR}>&- - exec {ptxd_make_serialize_get_writefd}>&- - exec {ptxd_make_serialize_get_readfd}>&- - exec {ptxd_make_serialize_extract_writefd}>&- - exec {ptxd_make_serialize_extract_readfd}>&- - - # let shell split by IFS - set -- ${PTXCONF_SETUP_ENV_WHITELIST} ${PTXDIST_ENV_WHITELIST} PTXDIST_ENV_WHITELIST - whitelist="${*}" - whitelist="${whitelist:+|}${whitelist// /|}" - - unset $({ - export -p | sed -n 's/^declare -x \([^=]*\).*$/\1/p' - export -fp | sed -n 's/^declare -fx \([^=]*\).*$/\1/p' - } | grep -E -v "^(args|PTXDIST_PTXRC|PTX_AUTOBUILD_DESTDIR|PTXDIST_PLATFORMDIR|CCACHE_.*|PWD|HOME|USER|PATH|TERM|COLUMNS|LINES|DISPLAY|TMPDIR|http_proxy|https_proxy|ftp_proxy|no_proxy${whitelist})$") - - PATH=$(sed -e 's;[^:]*/sysroot-\(host\|cross\)/[^:]*:;;g' -e "s;${PTXDIST_TOPDIR}/bin:;;" -e "s;${PTXDIST_TOOLCHAIN}:;;" <<< "${PATH}") - - eval "${args[@]}" -} -export -f ptxd_make_nested_ptxdist_impl - -# -# Clear the environment and call a nested PTXdist. -# Can be used to build other platforms. -# -ptxd_make_nested_ptxdist() { - local -a args - - ptxd_make_world_init || return - - if [ -z "${pkg_workspace}" ]; then - pkg_workspace="${PTXDIST_WORKSPACE}" - fi - args=( "cd" "${pkg_workspace}" "&&" "${PTXDIST_TOPDIR}/bin/ptxdist" ) - - if [ "${PTXDIST_DIRTY}" = 1 ]; then - args[${#args[*]}]="--dirty" - fi - if [ "${PTXDIST_FORCE}" = 1 ]; then - args[${#args[*]}]="--force" - fi - if [ "${PTXDIST_PEDANTIC}" = 1 ]; then - args[${#args[*]}]="--pedantic" - fi - if [ "${PTXDIST_QUIET}" = 1 ]; then - args[${#args[*]}]="--quiet" - fi - if [ "${PTXDIST_VERBOSE}" = 1 ]; then - args[${#args[*]}]="--verbose" - fi - if [ -n "${PTXDIST_PARALLEL_FLAGS}" ]; then - args[${#args[*]}]="${PTXDIST_PARALLEL_FLAGS}" - fi - if [[ "${PTXDIST_JOBSERVER_FLAGS}" =~ ^--jobserver-auth ]]; then - args[${#args[*]}]="${PTXDIST_JOBSERVER_FLAGS}" - fi - args+=( "${@}" ) - - ptxd_verbose "executing:" "${args[@]}" - - # run ptxdist but don't log it. It has it's on logfile - ( - exec 1> >(sed "s/^/${pkg_label}: /" >&${PTXDIST_FD_STDOUT}) - exec 2> >(sed "s/^/${pkg_label}: /" >&${PTXDIST_FD_STDERR}) - ptxd_make_nested_ptxdist_impl - ) -} -export -f ptxd_make_nested_ptxdist |