Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
seven steps to upgrade Gentoo System
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
sipingal
n00b
n00b


Joined: 12 May 2008
Posts: 62
Location: China

PostPosted: Thu Dec 17, 2009 2:06 am    Post subject: seven steps to upgrade Gentoo System Reply with quote

There is no a full HOWTO introducing whole system upgrading. I hope this simple document can help someone else.

1. sync portage tree(eix-sync is recommended)
Code:
# eix-sync

or
Code:
# emerge --sync


2. upgrade whole system
Code:
# emerge -avuDN --with-bdeps y --keep-going world


3. make configuration file(s) up to date
Code:
# etc-update

or
Code:
# dispatch-conf


4. fix static library
Code:
# lafilefixer --justfixit | grep -v skipping


5. uninstall useless packages
Code:
# emerge -av --depclean


6. Reverse dynamic library Dependency
Code:
# revdep-rebuild


7. clean source code of the old packages
Code:
# eclean -d distfiles


Last edited by sipingal on Thu Dec 17, 2009 6:38 am; edited 2 times in total
Back to top
View user's profile Send private message
alunduil
Retired Dev
Retired Dev


Joined: 13 Mar 2005
Posts: 96
Location: San Antonio, TX, USA

PostPosted: Thu Dec 17, 2009 2:15 am    Post subject: Reply with quote

I like it, but I'm not sure I'd agree with the --keep-going on the world update. I've seen that cause a few problems that would have been easier to handle if the emerge had died at the first sign of trouble.

On a different note, is a full system upgrade the process of checking everything for updates? If so, then you need to add at least an:

Code:

emerge -DuvaN system


Otherwise you can also consider rebuilding the entire set (Due to modifications to gcc or another piece of the toolchain) via:

Code:

emerge -ave system && emerge -ave system && emerge -ave world


That last one isn't really an upgrade, but it might be appropriate to mention it and when it's applicable.

Just a couple of suggestions.

Thanks for the document.

Regards,

Alunduil
Back to top
View user's profile Send private message
huckabuck
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2007
Posts: 110
Location: Bronx, NY

PostPosted: Thu Dec 17, 2009 3:08 am    Post subject: Reply with quote

i'd definitely run revdep-rebuild after --depclean , and not before ... since thats the warning posted when you run it anyway. And i run it as
Code:
emerge -pv --depclean
before i execute it. I've had shit break after it cleans up.
Back to top
View user's profile Send private message
sipingal
n00b
n00b


Joined: 12 May 2008
Posts: 62
Location: China

PostPosted: Thu Dec 17, 2009 6:42 am    Post subject: Reply with quote

huckabuck wrote:
i'd definitely run revdep-rebuild after --depclean , and not before ... since thats the warning posted when you run it anyway. And i run it as
Code:
emerge -pv --depclean
before i execute it. I've had shit break after it cleans up.


Thanks, fixed. ;)
Back to top
View user's profile Send private message
Bircoph
Developer
Developer


Joined: 27 Jun 2008
Posts: 261
Location: Moscow

PostPosted: Thu Dec 17, 2009 8:06 pm    Post subject: Reply with quote

1) Sometimes depclean should be run twice: before and after revdep-rebuild.
2) You missed very important step between 2 and 3: fix dozen of compilation/install failures ;-).
3) lafixer is often needed during world update due to failed packages because some "useless" *.la file was removed from the system.
_________________
Per aspera ad astra!
Back to top
View user's profile Send private message
NotQuiteSane
Guru
Guru


Joined: 30 Jan 2005
Posts: 488
Location: Klamath Falls, Jefferson, USA, North America, Midgarth

PostPosted: Sat Dec 19, 2009 4:25 pm    Post subject: Reply with quote

I though this was how you kept the system up to date?

NQS
_________________
These opinions are mine, mine I say! Piss off and get your own.

As I see it -- An irregular blog, Improved with new location

To delete French language packs from system use 'sudo rm -fr /'
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sat Dec 19, 2009 5:11 pm    Post subject: Reply with quote

For my concern, I always run this :

Code:

# emerge -auDNv world
# dispatch-conf
# revdep-rebuild -i
# eclean-dist -id
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sat Dec 19, 2009 5:12 pm    Post subject: Reply with quote

I'm not really sure if it's a good thing this command :

Code:

# emerge -avuDN --with-bdeps y --keep-going world


If it crash, I want to see it actually, so --keep-going is maybe not a good idea for someone who is new to Gentoo.
Back to top
View user's profile Send private message
keenblade
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1087

PostPosted: Sat Dec 19, 2009 8:22 pm    Post subject: Reply with quote

d2_racing wrote:
I'm not really sure if it's a good thing this command :

Code:

# emerge -avuDN --with-bdeps y --keep-going world


If it crash, I want to see it actually, so --keep-going is maybe not a good idea for someone who is new to Gentoo.

I think "--keep-going" is very good most times. When I wake up, I don't want to see a world update has interrupted at the beginning, because Frozen-Bubble failed to emerge. If an important package fails, mostly it and some depended packages fails and nothing more. It is very very rare that something bad can happen. I am using it since it is available. Nothing wrong has gone with it. Also at the end, portage gives a list of failed emerges.
My update way:
Code:

layman -S ; eix-sync ; emerge -vuDNf world ; emerge -vuD --reinstall changed-use --keep-going world --with-bdeps=y ; update-live-ebuilds ; emerge -v1 --keep-going @preserved-rebuild ; etc-proposals

This way I first fetch all the sources, then update if necessary.
_________________
Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1"
Back to top
View user's profile Send private message
Bircoph
Developer
Developer


Joined: 27 Jun 2008
Posts: 261
Location: Moscow

PostPosted: Sat Dec 19, 2009 9:33 pm    Post subject: Reply with quote

d2_racing wrote:
I'm not really sure if it's a good thing this command :

Code:

# emerge -avuDN --with-bdeps y --keep-going world


If it crash, I want to see it actually, so --keep-going is maybe not a good idea for someone who is new to Gentoo.

This is very good command indeed, it saved several days of my life.

When you performing large updage (e.g. 2100+ packages installed and update once per two months) on ~arch, some packages will definitely cease to compile. Usually I have one failure per 50-100 packages being updated.

Without --keep-going option update will stop after each error, and I personally can't monitor it 24/7, but only at evenings or spare time on weekends. Thus huge amount of time and my nerves will be lost due to near dozen of such breaks. With --keep-going option you can see in the end what dies, you can always read build logs in /var/tmp/portage/ and decide what action should be done to fix the problem. --keep-going way approach requires one/two time manual intervention in the build process, which saves both time and health.

And one additional point should be emphasized: always read emerge output, even if this takes several dozens of screens. Some notes are almost critical for normal further performance: e.g. you must rebuild all x11-drivers installed (even if they are not updated) if Xorg was updated from x0.y0.z0 to x1.y1.z1, where x or y changed; otherwise you will encounter very unpleasant situation when both keyboard and mouse cease to work after X upgrade.
_________________
Per aspera ad astra!
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sat Dec 19, 2009 10:33 pm    Post subject: Reply with quote

Bircoph wrote:
And one additional point should be emphasized: always read emerge output, even if this takes several dozens of screens. Some notes are almost critical for normal further performance: e.g. you must rebuild all x11-drivers installed (even if they are not updated) if Xorg was updated from x0.y0.z0 to x1.y1.z1, where x or y changed; otherwise you will encounter very unpleasant situation when both keyboard and mouse cease to work after X upgrade.


I use elogv to see that is going on my box too.

Code:

# emerge -av elogv


Then add this inside your make.conf

Code:

PORTAGE_ELOG_CLASSES="log warn error info"
PORTAGE_ELOG_SYSTEM="echo:log,warn,error,info  save:log,warn,error,info syslog:error"
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Tue Dec 29, 2009 11:00 pm    Post subject: Reply with quote

Quote:
Without --keep-going option update will stop after each error, and I personally can't monitor it 24/7, but only at evenings or spare time on weekends. Thus huge amount of time and my nerves will be lost due to near dozen of such breaks. With --keep-going option you can see in the end what dies, you can always read build logs in /var/tmp/portage/ and decide what action should be done to fix the problem. --keep-going way approach requires one/two time manual intervention in the build process, which saves both time and health.


Agreed. To me this is a huge time saver. Before that I had to use external scripts for this. On most machines (even at work) I make that default with

Code:
EMERGE_DEFAULT_OPTS="--keep-going --jobs 6"


in my /etc/make.conf

and use emerge --ignore to disable that on the rare occasion that I do not want it to keep going.

I do adjust the jobs param for lesser powered systems to 2. This is a quad core.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
Bircoph
Developer
Developer


Joined: 27 Jun 2008
Posts: 261
Location: Moscow

PostPosted: Mon Jan 11, 2010 1:38 am    Post subject: Reply with quote

d2_racing wrote:

Code:

PORTAGE_ELOG_CLASSES="log warn error info"
PORTAGE_ELOG_SYSTEM="echo:log,warn,error,info  save:log,warn,error,info syslog:error"

1. There is no need to duplicate message classes if you do not want to override $PORTAGE_ELOG_CLASSES for current output module. So
Code:

PORTAGE_ELOG_CLASSES="log warn error info"
PORTAGE_ELOG_SYSTEM="echo save syslog:error"

will be the same.

2. After some updates I removed 'info' from $PORTAGE_ELOG_CLASSES: it provides too much useless information. It's too hard to read all this spam for several hundreds of packages.

Ideal solution will be accept info messages for postinstall only, but neither portage's make.conf nor elogv itself provides this kind of filtering. Aside from postinstall info messages I doubt some would want to read about applied patches or auto* hooks.
_________________
Per aspera ad astra!
Back to top
View user's profile Send private message
diablo465
Apprentice
Apprentice


Joined: 10 Sep 2013
Posts: 194

PostPosted: Mon Jan 27, 2014 10:07 am    Post subject: Reply with quote

Thanks guys, very useful information, i just want to mark this post, but it seems post a reply is the only way, right?
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon Jan 27, 2014 7:57 pm    Post subject: Reply with quote

@diablo465: a bookmark is better. Searching under "my posts", it'll drop out soon enough.

As for the "recipe" consider update. It does all the above, and @preserved-rebuild etc when required, as well as a whole lot more. You can configure practically everything, and it's designed for use in scripts as well as interactively.

(Use the git version, if you try it.)
Back to top
View user's profile Send private message
gentoo_lamb
n00b
n00b


Joined: 19 Apr 2014
Posts: 3

PostPosted: Sat Apr 19, 2014 2:37 am    Post subject: Reply with quote

Very useful post. Thank you!
Back to top
View user's profile Send private message
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 140
Location: Finland

PostPosted: Sat Apr 19, 2014 5:59 am    Post subject: Reply with quote

This howto should be added to wiki.gentoo.org
_________________
https://github.com/defer-
Back to top
View user's profile Send private message
molec
n00b
n00b


Joined: 13 Sep 2014
Posts: 2
Location: Germany

PostPosted: Mon Oct 26, 2015 10:09 pm    Post subject: Re: seven steps to upgrade Gentoo System Reply with quote

great guide, thanks.

Code:
# eselect news list


and/or

Code:
# eselect news read


is something I'm trying to make a habit of. Not sure if it should be added to the guide. It's not essential, but it can save a lot of hassle later on.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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