GNOME Bugzilla – Bug 398479
Need to make errors visible
Last modified: 2007-09-19 19:52:24 UTC
Lots of things can go wrong while Sabayon unpacks a user profile, collects changes made to the configuration, packs the profile again, etc. We use several helper procesess (sabayon-apply inside sabayon-session inside sabayon), and when an error occurs in one of them, the user often doesn't see the error. We could use this information to make Sabayon more robust - either by fixing the bug which caused the error, or by handling that error condition gracefully. The helper programs (sabayon-session, sabayon-apply) could exit with well-defined codes, which the parent process (sabayon) could use to present a meaningful error dialog to the user. Something like exit(1) - means the child exited abnormally due to an unhandled exception exit(2) - means sabayon-apply could apply *most* of the profile, but it failed in some sections etc. Then for (2) we could gather the exceptions from the failed bits and print them out nicely.
Just throwing random ideas here - but maybe the concept of a log file might be helpful here. Sysadmins are pretty comfortable with grepping through log files, and instead of blabbering in the background, Sabayon could maybe use logging module and put stuff in a log file (we can also make the log level configurable, or specifiable via a command line option).
Yeah. I'll be working on this, since it will also help us debug the goddamn thing easily :)
This is happening in the "debug-log" branch, by the way: svn checkout svn+ssh://svn.gnome.org/svn/sabayon/branches/debug-log
This got merged yesterday (revision 715 in trunk).