From f5b38dbf0de77c019c9b05710c046408287d4834 Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Thu, 28 Mar 2019 14:05:26 -0400 Subject: [PATCH] pentoo-updater: safety first --- scripts/pentoo-updater.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/pentoo-updater.sh b/scripts/pentoo-updater.sh index bb4e8b297..cc891356c 100755 --- a/scripts/pentoo-updater.sh +++ b/scripts/pentoo-updater.sh @@ -250,8 +250,16 @@ else fi "${PYTHON2}" -c "from _multiprocessing import SemLock" || emerge -1 python:"${PYTHON2#python}" "${PYTHON3}" -c "from _multiprocessing import SemLock" || emerge -1 python:"${PYTHON3#python}" +#always update portage as early as we can (after making sure python works) emerge --update --newuse --oneshot --changed-use --newrepo portage || safe_exit +portage_features="$(portageq envvar FEATURES)" +if [ "${portage_features}" != "${portage_features/getbinpkg//}" ]; then + #learned something new, if a package updates before glibc and uses the newer glibc, the chance of breakage is + #*much* higher than if glibc is updated first. so let's just update glibc first. + emerge --update --newuse --oneshot --changed-use --newrepo glibc || safe_exit +fi + #modified from news item "Python ABIFLAGS rebuild needed" if [ -n "$(find /usr/lib*/python3* -name '*cpython-3[3-5].so')" ]; then emerge -1v --usepkg=n --buildpkg=y $(find /usr/lib*/python3* -name '*cpython-3[3-5].so')