Check for perl-cleaner|haskell-updater necessity before @system upgrade as far as python may depend on perl.

This commit is contained in:
Kolan Sh 2013-12-16 15:24:36 +04:00
parent b1a2845b9e
commit a645d3a041
1 changed files with 19 additions and 12 deletions

View File

@ -332,6 +332,25 @@ if [ $STAGE_CNT -eq $STAGE ]; then
fi
let STAGE_CNT++
# Check if we should run perl-cleaner or haskell-updater after @system upgrade
if [ $STAGE_CNT -eq $STAGE ]; then
echo 'Test and remember if we should run perl-cleaner after @system upgrade'
if [[ 0 -ne `qlist -IC dev-lang/perl | wc -l`
&& 0 -ne `emerge -uNp dev-lang/perl 2>&1 | grep '^\[' | wc -l` ]]; then
touch /etc/portage/need_upgrade_perl
fi
echo 'Test and remember if we should run haskell-updater after @system upgrade'
if [[ 0 -ne `qlist -IC dev-lang/ghc | wc -l`
&& 0 -ne `emerge -uNp dev-lang/ghc 2>&1 | grep '^\[' | wc -l` ]]; then
touch /etc/portage/need_upgrade_haskell
fi
let STAGE++
fi
let STAGE_CNT++
# Python upgrade
if [ $STAGE_CNT -eq $STAGE ]; then
echo "======= STAGE $STAGE: Python upgrade ======="
@ -383,18 +402,6 @@ let STAGE_CNT++
if [ $STAGE_CNT -eq $STAGE ]; then
echo "======= STAGE $STAGE: @system upgrade ======="
echo 'Test and remember if we should run perl-cleaner after @system upgrade'
if [[ 0 -ne `qlist -IC dev-lang/perl | wc -l`
&& 0 -ne `emerge -uNp dev-lang/perl 2>&1 | grep '^\[' | wc -l` ]]; then
touch /etc/portage/need_upgrade_perl
fi
echo 'Test and remember if we should run haskell-updater after @system upgrade'
if [[ 0 -ne `qlist -IC dev-lang/ghc | wc -l`
&& 0 -ne `emerge -uNp dev-lang/ghc 2>&1 | grep '^\[' | wc -l` ]]; then
touch /etc/portage/need_upgrade_haskell
fi
echo '------- Upgrading @system packages -------'
emerge -uDNvt --with-bdeps=y @system
[ 0 -ne $? ] && echo "Stage $STAGE: @system upgrade failed ;-( =======" && exit $STAGE