Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

seven steps to upgrade Gentoo System

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
18 posts • Page 1 of 1
Author
Message
sipingal
n00b
n00b
User avatar
Posts: 63
Joined: Mon May 12, 2008 11:36 am
Location: China

seven steps to upgrade Gentoo System

  • Quote

Post by sipingal » Thu Dec 17, 2009 2:06 am

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: Select all

# eix-sync
or

Code: Select all

# emerge --sync
2. upgrade whole system

Code: Select all

# emerge -avuDN --with-bdeps y --keep-going world
3. make configuration file(s) up to date

Code: Select all

# etc-update
or

Code: Select all

# dispatch-conf
4. fix static library

Code: Select all

# lafilefixer --justfixit | grep -v skipping 
5. uninstall useless packages

Code: Select all

# emerge -av --depclean
6. Reverse dynamic library Dependency

Code: Select all

# revdep-rebuild
7. clean source code of the old packages

Code: Select all

# eclean -d distfiles
Last edited by sipingal on Thu Dec 17, 2009 6:38 am, edited 2 times in total.
Top
alunduil
Retired Dev
Retired Dev
Posts: 96
Joined: Sun Mar 13, 2005 4:41 am
Location: San Antonio, TX, USA
Contact:
Contact alunduil
Website

  • Quote

Post by alunduil » Thu Dec 17, 2009 2:15 am

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: Select all

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: Select all

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
Top
huckabuck
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 110
Joined: Sat Apr 14, 2007 11:59 am
Location: Bronx, NY

  • Quote

Post by huckabuck » Thu Dec 17, 2009 3:08 am

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: Select all

emerge -pv --depclean
before i execute it. I've had shit break after it cleans up.
Top
sipingal
n00b
n00b
User avatar
Posts: 63
Joined: Mon May 12, 2008 11:36 am
Location: China

  • Quote

Post by sipingal » Thu Dec 17, 2009 6:42 am

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: Select all

emerge -pv --depclean
before i execute it. I've had shit break after it cleans up.
Thanks, fixed. ;)
Top
Bircoph
Retired Dev
Retired Dev
User avatar
Posts: 261
Joined: Fri Jun 27, 2008 3:32 am
Location: Moscow

  • Quote

Post by Bircoph » Thu Dec 17, 2009 8:06 pm

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!
Top
NotQuiteSane
Guru
Guru
User avatar
Posts: 492
Joined: Sun Jan 30, 2005 1:28 am
Location: Klamath Falls, Jefferson, USA, North America, Midgarth
Contact:
Contact NotQuiteSane
Website

  • Quote

Post by NotQuiteSane » Sat Dec 19, 2009 4:25 pm

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 /'
Top
d2_racing
Bodhisattva
Bodhisattva
User avatar
Posts: 13047
Joined: Mon Apr 25, 2005 2:25 pm
Location: Ste-Foy,Canada
Contact:
Contact d2_racing
Website

  • Quote

Post by d2_racing » Sat Dec 19, 2009 5:11 pm

For my concern, I always run this :

Code: Select all

# emerge -auDNv world
# dispatch-conf
# revdep-rebuild -i
# eclean-dist -id
Top
d2_racing
Bodhisattva
Bodhisattva
User avatar
Posts: 13047
Joined: Mon Apr 25, 2005 2:25 pm
Location: Ste-Foy,Canada
Contact:
Contact d2_racing
Website

  • Quote

Post by d2_racing » Sat Dec 19, 2009 5:12 pm

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

Code: Select all

# 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.
Top
keenblade
Veteran
Veteran
User avatar
Posts: 1087
Joined: Sun Oct 03, 2004 6:19 pm
Contact:
Contact keenblade
Website

  • Quote

Post by keenblade » Sat Dec 19, 2009 8:22 pm

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

Code: Select all

# 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: Select all

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"
Top
Bircoph
Retired Dev
Retired Dev
User avatar
Posts: 261
Joined: Fri Jun 27, 2008 3:32 am
Location: Moscow

  • Quote

Post by Bircoph » Sat Dec 19, 2009 9:33 pm

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

Code: Select all

# 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!
Top
d2_racing
Bodhisattva
Bodhisattva
User avatar
Posts: 13047
Joined: Mon Apr 25, 2005 2:25 pm
Location: Ste-Foy,Canada
Contact:
Contact d2_racing
Website

  • Quote

Post by d2_racing » Sat Dec 19, 2009 10:33 pm

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: Select all

# emerge -av elogv
Then add this inside your make.conf

Code: Select all

PORTAGE_ELOG_CLASSES="log warn error info"
PORTAGE_ELOG_SYSTEM="echo:log,warn,error,info  save:log,warn,error,info syslog:error"
Top
drescherjm
Advocate
Advocate
Posts: 2792
Joined: Sat Jun 05, 2004 5:46 am
Location: Pittsburgh, PA, USA

  • Quote

Post by drescherjm » Tue Dec 29, 2009 11:00 pm

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: Select all

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
Top
Bircoph
Retired Dev
Retired Dev
User avatar
Posts: 261
Joined: Fri Jun 27, 2008 3:32 am
Location: Moscow

  • Quote

Post by Bircoph » Mon Jan 11, 2010 1:38 am

d2_racing wrote:

Code: Select all

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: Select all

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!
Top
diablo465
Apprentice
Apprentice
Posts: 194
Joined: Tue Sep 10, 2013 11:00 am

  • Quote

Post by diablo465 » Mon Jan 27, 2014 10:07 am

Thanks guys, very useful information, i just want to mark this post, but it seems post a reply is the only way, right?
Top
steveL
Watchman
Watchman
Posts: 5153
Joined: Wed Sep 13, 2006 1:18 pm
Location: The Peanut Gallery

  • Quote

Post by steveL » Mon Jan 27, 2014 7:57 pm

@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.)
Top
gentoo_lamb
n00b
n00b
Posts: 3
Joined: Sat Apr 19, 2014 2:32 am

  • Quote

Post by gentoo_lamb » Sat Apr 19, 2014 2:37 am

Very useful post. Thank you!
Top
defer-
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 140
Joined: Mon Jun 11, 2007 1:53 am
Location: Finland
Contact:
Contact defer-
Website

  • Quote

Post by defer- » Sat Apr 19, 2014 5:59 am

This howto should be added to wiki.gentoo.org
https://github.com/defer-
Top
molec
n00b
n00b
User avatar
Posts: 2
Joined: Sat Sep 13, 2014 6:20 am
Location: Germany

Re: seven steps to upgrade Gentoo System

  • Quote

Post by molec » Mon Oct 26, 2015 10:09 pm

great guide, thanks.

Code: Select all

# eselect news list
and/or

Code: Select all

# 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.
Top
Post Reply

18 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic