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

@ -47,10 +47,7 @@ make
# Install
install bash ${PREFIX}/bin/
mkdir /bin/
ln -s ${PREFIX}/bin/bash /bin/bash
ln -s ${PREFIX}/bin/bash /bin/sh
ln -s ${PREFIX}/bin/bash ${PREFIX}/bin/sh
install bash ${PREFIX}/bin/sh
cd ../..

View File

@ -53,9 +53,5 @@ src_compile() {
src_install() {
install -D bash "${DESTDIR}${PREFIX}/bin/bash"
# Work around weird symlink bug
install bash "${DESTDIR}${PREFIX}/bin/sh"
# Needs special handling b/c is currently running - tar doesn't like this
rm -f "${PREFIX}/bin/bash" "${PREFIX}/bin/sh"
}

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

View File

@ -74,6 +74,7 @@ build: coreutils-6.10
build: gawk-3.0.4
build: perl-5.000
build: perl-5.003
uninstall: perl-5.000
build: perl5.004-05
build: perl5.005-03
build: perl-5.6.2