Eselect Python automatically only if PYTHON_ESELECT=TRUE set.

This commit is contained in:
Kolan Sh 2016-09-02 18:40:12 +03:00
parent 51ac224d06
commit 99cd731498
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,5 @@
EGENCACHE=FALSE EGENCACHE=FALSE
ECLEAN_DISTFILES=TRUE ECLEAN_DISTFILES=TRUE
PYTHON_ESELECT=FALSE
RW_REMOUNT='/boot' RW_REMOUNT='/boot'
RO_REMOUNT='/boot' RO_REMOUNT='/boot'

View File

@ -360,8 +360,11 @@ if [ $STAGE_CNT -eq $STAGE ]; then
echo "Running python-updater..." echo "Running python-updater..."
touch /etc/portage/need_upgrade_python touch /etc/portage/need_upgrade_python
[ 0 != $? ] && echo "Stage $STAGE: cann't touch /etc/portage/need_upgrade_python ;-( =======" && exit $STAGE [ 0 != $? ] && echo "Stage $STAGE: cann't touch /etc/portage/need_upgrade_python ;-( =======" && exit $STAGE
in_list "$PYTHON_ESELECT" ${TRUE_LIST[@]}
if [ 0 -eq $? ]; then
eselect python set $new_python eselect python set $new_python
[ 0 != $? ] && echo "Stage $STAGE: cann't switch to another python version ;-( =======" && exit $STAGE [ 0 != $? ] && echo "Stage $STAGE: cann't switch to another python version ;-( =======" && exit $STAGE
fi
if [ `which python-updater 2>/dev/null` ]; then if [ `which python-updater 2>/dev/null` ]; then
$NICE_CMD python-updater $NICE_CMD python-updater