diff --git a/sbin/gentoo-upgrade.sh b/sbin/gentoo-upgrade.sh index 4dbf4bc..6a3ca23 100755 --- a/sbin/gentoo-upgrade.sh +++ b/sbin/gentoo-upgrade.sh @@ -316,7 +316,7 @@ if [ $STAGE_CNT -eq $STAGE ]; then fi let STAGE_CNT++ -# Check if we should run perl-cleaner or haskell-updater after @system upgrade +# Check if we should run perl-cleaner or haskell-updater if [ $STAGE_CNT -eq $STAGE ]; then echo 'Test and remember if we should run perl-cleaner after @system upgrade' @@ -335,6 +335,24 @@ if [ $STAGE_CNT -eq $STAGE ]; then fi let STAGE_CNT++ +# Perl upgrade +if [ $STAGE_CNT -eq $STAGE ]; then + echo "======= STAGE $STAGE: Perl upgrade =======" + + if [ -f /etc/portage/need_upgrade_perl ]; then + echo "Running perl-cleaner..." + $NICE_CMD perl-cleaner --reallyall + [ 0 != $? ] && echo "Stage $STAGE: perl-cleaner failed ;-( =======" && exit $STAGE + rm /etc/portage/need_upgrade_perl + [ 0 != $? ] && echo "Stage $STAGE: cann't remove /etc/portage/need_upgrade_perl ;-( =======" && exit $STAGE + else + echo "------- Not need to upgrade perl -------" + fi + + let STAGE++ +fi +let STAGE_CNT++ + # Python upgrade if [ $STAGE_CNT -eq $STAGE ]; then echo "======= STAGE $STAGE: Python upgrade =======" @@ -486,24 +504,6 @@ if [ $STAGE_CNT -eq $STAGE ]; then fi let STAGE_CNT++ -# Perl upgrade -if [ $STAGE_CNT -eq $STAGE ]; then - echo "======= STAGE $STAGE: Perl upgrade =======" - - if [ -f /etc/portage/need_upgrade_perl ]; then - echo "Running perl-cleaner..." - $NICE_CMD perl-cleaner --reallyall - [ 0 != $? ] && echo "Stage $STAGE: perl-cleaner failed ;-( =======" && exit $STAGE - rm /etc/portage/need_upgrade_perl - [ 0 != $? ] && echo "Stage $STAGE: cann't remove /etc/portage/need_upgrade_perl ;-( =======" && exit $STAGE - else - echo "------- Not need to upgrade perl -------" - fi - - let STAGE++ -fi -let STAGE_CNT++ - # Scan for missed shared libraries if [ $STAGE_CNT -eq $STAGE ]; then echo "======= STAGE $STAGE: Scan for old versions of shared libraries ======="