4d5ba1497c
portage now generates /etc/python-exec/python-exec.conf based on the order of PYTHON_TARGETS in /etc/portage/make.conf fixes an issue where ARCH was being detected as amd64 not x86_64 fixes kernel installs (virtual/dist-kernel) standardizes simple if statements (note, the 'shorthand' method will pass the exit code back to shell but the 'longhand' does not). Change-Id: I74041c232bc6ab4d6e67a4ecfaa759aa4a5feb6c Signed-off-by: Matthew Thode <mthode@mthode.org>
40 lines
1.4 KiB
Bash
Executable File
40 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
if [[ ${DIB_DEBUG_TRACE:-0} -gt 0 ]]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
if mountpoint -q /dev/shm; then
|
|
echo "/dev/shm found in /proc/self/mountinfo"
|
|
elif [[ -k /dev/shm ]]; then
|
|
echo "/dev/shm exists and is stickied"
|
|
else
|
|
fix_shm
|
|
fi
|
|
|
|
[[ ! -f ${PORTDIR}/profiles ]] && emerge-webrsync -q
|
|
|
|
# set active python targets
|
|
echo "PYTHON_TARGETS=\"${GENTOO_PYTHON_TARGETS}\"" >> /etc/portage/make.conf
|
|
# disable python in git if we have to, it only supports python-2.7
|
|
[[ "${GENTOO_PYTHON_TARGETS}" != *"python2_7"* ]] && echo 'dev-vcs/git -python' >> /etc/portage/package.use/git
|
|
|
|
# install portage first due to bug in env vars not being passed when portage installs itself and re-inits
|
|
emerge ${GENTOO_EMERGE_DEFAULT_OPTS} --update --newuse --deep sys-apps/portage
|
|
# set the active python version
|
|
emerge ${GENTOO_EMERGE_DEFAULT_OPTS} --oneshot --update --newuse --nodeps dev-lang/python-exec python-exec-conf
|
|
echo yes | etc-update --automode -3 /etc/python-exec/python-exec.conf
|
|
|
|
# make world consistant
|
|
emerge ${GENTOO_EMERGE_DEFAULT_OPTS} --complete-graph=y --update --newuse --deep @world
|
|
# rebuild packages that might need it
|
|
emerge ${GENTOO_EMERGE_DEFAULT_OPTS} --usepkg=n @preserved-rebuild
|
|
# remove unneeded packages
|
|
emerge --verbose=n --depclean
|
|
# rebuild packages that might have somehow depended on the unneeded packages
|
|
emerge ${GENTOO_EMERGE_DEFAULT_OPTS} --usepkg=n @preserved-rebuild
|
|
|
|
unfix_shm
|