Don't touch live filesystem in bash-5.2.15

Rather, uninstall existing bash before bash is built
This commit is contained in:
fosslinux 2024-01-12 22:09:22 +11:00
parent bbe121f382
commit 5b84cdd178
4 changed files with 7 additions and 13 deletions

View file

@ -95,11 +95,6 @@ bin_preseed() {
if [ "${UPDATE_CHECKSUMS}" = "True" ] || src_checksum "${pkg}" $((revision)); then
echo "${pkg}: installing prebuilt package."
mv "${pkg}_${revision}"* /external/repo || return 1
if [[ "${pkg}" == bash-* ]]; then
# tar does not like overwriting running bash
# shellcheck disable=SC2153
rm -f "${PREFIX}/bin/bash" "${PREFIX}/bin/sh"
fi
cd "/external/repo"
rm -f /tmp/filelist.txt
src_apply "${pkg}" $((revision))
@ -471,6 +466,11 @@ src_apply() {
TAR_PREFIX="/tmp/"
fi
# Bash does not like to be overwritten
if [[ "${pkg}" == bash-* ]]; then
rm "${PREFIX}/bin/bash"
fi
# Overwriting files is mega busted, so do it manually
# shellcheck disable=SC2162
if [ -e /tmp/filelist.txt ]; then