Don't upgrade Python if it's not necessary.

This commit is contained in:
Kolan Sh 2015-08-30 18:29:41 +03:00
parent bf36505e4a
commit 421f1ed418
1 changed files with 3 additions and 4 deletions

View File

@ -336,12 +336,11 @@ if [ $STAGE_CNT -eq $STAGE ]; then
echo 'Test and remember if we should run python-updater after Python upgrade'
if [ 0 -ne `emerge -uNp dev-lang/python 2>&1 | grep '^\[' | wc -l` ]; then
touch /etc/portage/need_upgrade_python
echo '------- Upgrading Python package -------'
emerge -1uDNvt --with-bdeps=y python
[ 0 -ne $? ] && echo "Stage $STAGE: Python upgrade failed ;-( =======" && exit $STAGE
fi
echo '------- Upgrading Python package -------'
emerge -1uDNvt --with-bdeps=y python
[ 0 -ne $? ] && echo "Stage $STAGE: Python upgrade failed ;-( =======" && exit $STAGE
available_python_list=`eselect python list | cut -d" " -f6 | grep -v ^$ | sort -rV`
[ "" == "$available_python_list" ] && echo "Stage $STAGE: empty available_python_list ;-( =======" && exit $STAGE