From 17eba7c441581b700e5191fdf2bf2b1ee153334c Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Mon, 16 Dec 2019 12:50:24 +0300 Subject: [PATCH] Upgrade Perl (perl-cleaner) before Python and @system... --- sbin/gentoo-upgrade.sh | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) 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 ======="