pentoo-updater: safety first

This commit is contained in:
Rick Farina (Zero_Chaos) 2019-03-28 14:05:26 -04:00
parent b68fa1c7aa
commit f5b38dbf0d
No known key found for this signature in database
GPG key ID: A5DD1427DD11F94A

View file

@ -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')