Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Tiny and ugly solution to downgrading
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
nillekind
n00b
n00b


Joined: 05 Oct 2002
Posts: 64

PostPosted: Sat Mar 01, 2003 11:43 am    Post subject: Tiny and ugly solution to downgrading Reply with quote

Hi,
you get always p*****, because portage wants to downgrade packages from unstable, but you want the unstable ones ? So, here's my solution:

Code:

#!/bin/sh
###############################################
## Gentoo World Upgrade Script
###############################################

## Should we rsync first?
echo "Rsync? [y/N]"
read yesno
if [ $yesno == y ] ; then
emerge rsync
fi

## Prevent downgrade of ~x86 (unstable) packages
# Actually there are 2 files needed
# This one is to be edited manually
# /etc/inject.persist : Files not shown as downgraded,
#                       but version of the file to be
#                       merged is lower than the installed one's
#
# /etc/inject : Files shown as to be downgraded will auto-
#               magically be injected 
emerge -pu world | grep D] | cut -d" " -f6 > /etc/inject
emerge -i `cat /etc/inject /etc/inject.persist`

## Show what would be merged
emerge -pu world
echo "Start the Upgrade? [Y/n]?"
read answer

## No Upgrade
if [ $answer == n ] ; then
        emerge -C `cat /etc/inject /etc/inject.persist`
        exit 1

## Upgrade
else
        # Should we build Binaries for merged packages ?
        echo "Build Binary Packages? [y/N]"
        read answer
        if [ answer == y ] ; then
                build="-b"
        else
                build=""
        fi
        emerge -u $build world
        emerge -C `cat /etc/inject /etc/inject.persist`

fi


Have Fun,
Conner
Back to top
View user's profile Send private message
Blurpy
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2003
Posts: 111
Location: Norway

PostPosted: Sat Mar 01, 2003 1:27 pm    Post subject: Reply with quote

You can use emerge -pU world instead :D
It was added it the new portage version.
Back to top
View user's profile Send private message
nillekind
n00b
n00b


Joined: 05 Oct 2002
Posts: 64

PostPosted: Sat Mar 01, 2003 3:10 pm    Post subject: Reply with quote

Good to hear that. BUT:
Code:

root@nillekind /usr/local/bin # emerge -pu world

These are the packages that I would merge, in order:

Calculating world dependencies ...done!
[ebuild    U ] media-gfx/gimp-1.2.3-r3 [1.3.10]
[ebuild    U ] media-video/nvidia-kernel-1.0.3123-r2 [1.0.4191-r1]
[ebuild    UD] media-libs/freetype-2.1.2-r2 [2.1.3-r2]
[ebuild    UD] media-libs/fontconfig-2.1 [2.1-r1]
[ebuild    UD] x11-base/xfree-4.2.1-r2 [4.3.0]
[ebuild    U ] dev-java/sun-j2sdk-1.4.1 [1.4.0-r2]
[ebuild    U-] net-mail/ssmtp-2.48 [2.38.14-r1]
[ebuild    U ] gnome-base/gnome-panel-1.4.2-r2 [2.2.0.1-r1]
[ebuild    U ] net-irc/xchat-1.8.10-r1 [1.9.6]


Code:

root@nillekind /usr/local/bin # emerge -pU world
>>> --upgradeonly implies --update... adding --update to options.

These are the packages that I would merge, in order:

Calculating world dependencies ...done!
[ebuild    U ] media-gfx/gimp-1.2.3-r3 [1.3.10]
[ebuild    U ] dev-java/sun-j2sdk-1.4.1 [1.4.0-r2]
[ebuild    U-] net-mail/ssmtp-2.48 [2.38.14-r1]
[ebuild    U ] gnome-base/gnome-panel-1.4.2-r2 [2.2.0.1-r1]
[ebuild    U ] net-irc/xchat-1.8.10-r1 [1.9.6]


Look at the gimp, xchat and gnome-panel versions. Portage will actually do a downgrade...BUG? Even though 2 versions can be installed, I don't want 2 of those packages installed....But at least this is a progress, anyways.

Conner
Back to top
View user's profile Send private message
avendesora
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1739
Location: Betelgeuse vicinity

PostPosted: Sat Mar 01, 2003 3:42 pm    Post subject: Reply with quote

Same thing here... xfree still wants to be downgraded :cry:

Code:
seigneur@gtm seigneur $ emerge -pU world
>>> --upgradeonly implies --update... adding --update to options.

These are the packages that I would merge, in order:

Calculating world dependencies ...done!
[ebuild    U ] sys-kernel/gentoo-sources-2.4.20-r1 [2.4.19-r10]
[ebuild    U ] app-admin/mirrorselect-0.2-r1 [0.2]
[ebuild    UD] x11-base/xfree-4.2.1-r2 [4.2.99.4]
[ebuild    U ] app-sci/zetagrid-1.0-r6 [1.0-r5]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum