Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Logging world updates to troubleshoot breakage
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
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5282

PostPosted: Sat Dec 22, 2012 6:01 pm    Post subject: Logging world updates to troubleshoot breakage Reply with quote

I see a lot of posts about stuff breaking, and it turns out whatever was broken happened after a world update. This is my little trick to make it easier to pin down the exact package at fault when I need to find out what broke.

Set up:


  • Log in as regular user.
  • In your home dir, do mkdir -p Portage/Logs
  • cd Portage
  • mkdir Depclean


Henceforth, when doing world update:


  • cd Portage/Logs
  • emerge --sync (&& layman -S, if you use layman)
  • if update for portage, do emerge -pv portage > (year)_(month)
  • if update for portage, emerge portage
  • emerge -pvuDN world >> (year)_(month)
  • emerge -vuDN --keep-going world
  • cd ../Depclean
  • emerge -p --depclean > (year)_(month)
  • emerge --depclean
  • revdep-rebuild


Of course, check the outputs of emerge -p and depclean -p before removing the "p". --noreplace anything that you don't want removed by depclean.

If anything breaks, review logs for possible culprits. You can choose to try to fix or up/downgrade to a working version.

This comes in very handy for me. I hope it's useful for others.

The log name format I use is because I do updates monthly. Use a name format that's appropriate for your update schedule/frequency.
_________________
Gentoo Studio: http://gentoostudio.org
Facebook: http://www.facebook.com/gentoostudio
G+: https://plus.google.com/113947758237122861689/posts
Pappy's Kernel Seeds: http://kernel-seeds.org
Back to top
View user's profile Send private message
kurly
Apprentice
Apprentice


Joined: 02 Apr 2012
Posts: 182

PostPosted: Sat Dec 22, 2012 10:21 pm    Post subject: Reply with quote

Alternately, install app-portage/genlop and try running: genlop -lu (or omit the u if you want to omit unmerges).

Also, in portage, I'm a fan of the -c shortcut for --depclean. (Though for a new user, it may not be as clear what's going on.)
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1942
Location: Zurich, Switzerland

PostPosted: Sat Dec 22, 2012 10:33 pm    Post subject: Reply with quote

Since my early days of gentoo, i keep a logfile, which contains the output of of any emerge command run - usually a manual copy of emerge -a <pkg> or emerge -aDu world. I tend to avoid -v (--verbose) as it clutters my log, and does not contain any useful information, and changed useflags are displayed by -a (or -p).

I keep one logfile per year, and add a new date whenever i synced the portage tree (and as the portage tree is synced to an internal server which updates the tree once per day, that precision is enough).


IIRC I initially started that log file, as I had some strange breakages, and that way they are easier to track.


just my .02$
V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


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

PostPosted: Sun Dec 23, 2012 6:38 pm    Post subject: Reply with quote

Interesting. The process you describe is exactly what update does, apart from a glsa-check after world update and before depclean, and it saves copies of the output (colour, and monochrome filtered and tab-separated) in ~/emerge/colourOutput and emergeList. What you're talking about would be a quick cp of the latter, before starting the build (since once it's underway, it deletes packages from each list, as they are installed.)

That's not hard of course, and might be a useful addition. ATM it has capability for syslog if used with -x (automated/server mode, designed for use under cron) or -l (or the 'logging=1' option is set in /etc/update).
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5282

PostPosted: Wed Dec 26, 2012 6:21 pm    Post subject: Reply with quote

steveL wrote:
Interesting. The process you describe is exactly what update does


Nice! Maybe I'll integrate this into Gentoo Studio. :)
_________________
Gentoo Studio: http://gentoostudio.org
Facebook: http://www.facebook.com/gentoostudio
G+: https://plus.google.com/113947758237122861689/posts
Pappy's Kernel Seeds: http://kernel-seeds.org
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


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

PostPosted: Thu Dec 27, 2012 8:03 pm    Post subject: Reply with quote

audiodef wrote:
Nice! Maybe I'll integrate this into Gentoo Studio. :)

Heh that'd be cool: I saw that site the other day, linked from one of your posts. Looks great, and I'll definitely use it when I finally get round to setting up a DAW. I used to work as an audio engineer many moons ago, and I miss it; ideally I'd code my own stuff, but I need that feeling again- I'm sure you know what I mean. :)
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