0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-02 09:46:52 -05:00

ci: Create named symbol for BINS_SCRATCH_DIR

Also, create the dir a bit earlier, right after it was put in the PATH.
This commit is contained in:
MarcoFalke 2023-01-09 11:56:57 +01:00
parent 49aefc2c2e
commit fac424fce7
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -24,6 +24,7 @@ if [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASa
fi fi
export P_CI_DIR="$PWD" export P_CI_DIR="$PWD"
export BINS_SCRATCH_DIR="${BASE_SCRATCH_DIR}/bins/"
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
echo "Creating $DOCKER_NAME_TAG container to run in" echo "Creating $DOCKER_NAME_TAG container to run in"
@ -64,14 +65,16 @@ else
fi fi
CI_EXEC () { CI_EXEC () {
$DOCKER_CI_CMD_PREFIX bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd \"$P_CI_DIR\" && $*" $DOCKER_CI_CMD_PREFIX bash -c "export PATH=${BINS_SCRATCH_DIR}:\$PATH && cd \"$P_CI_DIR\" && $*"
} }
CI_EXEC_ROOT () { CI_EXEC_ROOT () {
$DOCKER_CI_CMD_PREFIX_ROOT bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd \"$P_CI_DIR\" && $*" $DOCKER_CI_CMD_PREFIX_ROOT bash -c "export PATH=${BINS_SCRATCH_DIR}:\$PATH && cd \"$P_CI_DIR\" && $*"
} }
export -f CI_EXEC export -f CI_EXEC
export -f CI_EXEC_ROOT export -f CI_EXEC_ROOT
CI_EXEC mkdir -p "${BINS_SCRATCH_DIR}"
if [ -n "$DPKG_ADD_ARCH" ]; then if [ -n "$DPKG_ADD_ARCH" ]; then
CI_EXEC_ROOT dpkg --add-architecture "$DPKG_ADD_ARCH" CI_EXEC_ROOT dpkg --add-architecture "$DPKG_ADD_ARCH"
fi fi
@ -155,12 +158,11 @@ fi
if [ "$USE_BUSY_BOX" = "true" ]; then if [ "$USE_BUSY_BOX" = "true" ]; then
echo "Setup to use BusyBox utils" echo "Setup to use BusyBox utils"
CI_EXEC mkdir -p "${BASE_SCRATCH_DIR}/bins/"
# tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version) # tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version)
# find excluded for now because it does not recognize the -delete option in ./depends (fixed in later BusyBox version) # find excluded for now because it does not recognize the -delete option in ./depends (fixed in later BusyBox version)
# ar excluded for now because it does not recognize the -q option in ./depends (unknown if fixed) # ar excluded for now because it does not recognize the -q option in ./depends (unknown if fixed)
# shellcheck disable=SC1010 # shellcheck disable=SC1010
CI_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \| grep -v "^find$"\)\; do ln -s \$\(command -v busybox\) "${BASE_SCRATCH_DIR}/bins/\$util"\; done CI_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \| grep -v "^find$"\)\; do ln -s \$\(command -v busybox\) "${BINS_SCRATCH_DIR}/\$util"\; done
# Print BusyBox version # Print BusyBox version
CI_EXEC patch --help CI_EXEC patch --help
fi fi