View previous topic :: View next topic |
Author |
Message |
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6639 Location: The soundosphere
|
Posted: Sat Dec 22, 2012 6:01 pm Post subject: Logging world updates to troubleshoot breakage |
|
|
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. _________________ decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN |
|
Back to top |
|
|
kurly Apprentice
Joined: 02 Apr 2012 Posts: 260
|
Posted: Sat Dec 22, 2012 10:21 pm Post subject: |
|
|
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 |
|
|
Veldrin Veteran
Joined: 27 Jul 2004 Posts: 1945 Location: Zurich, Switzerland
|
Posted: Sat Dec 22, 2012 10:33 pm Post subject: |
|
|
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 |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Sun Dec 23, 2012 6:38 pm Post subject: |
|
|
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 |
|
|
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6639 Location: The soundosphere
|
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Thu Dec 27, 2012 8:03 pm Post subject: |
|
|
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 |
|
|
|
|
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
|
|