In the current eix-sync script, with the --quiet option set, the output of ' emerge --{metadata,sync}' is written to /dev/null, which is a rather bad idea for any situation where you want to automate running eix-sync. This patch writes the output of 'emerge --{metadata,sync}' to /var/log/emerge-sync.log as ' eupdatedb --sync' does, so that admins can check where it all went wrong when it has all gone wrong. Reproducible: Always Steps to Reproduce: Actual Results: Expected Results:
Created attachment 72449 [details, diff] eix-0.5.0_beta-sync-log.patch
Improved patch coming soon. 8-)
Created attachment 72454 [details, diff] eix-0.5.0_beta-sync-log.patch
The logfile should be cleaned at startup, so it's guaranteed that the file is clean and the error-messages should tell the admin about the logfile ("A logfile was created in blabla" or similar). just my 2 cents :)
(In reply to comment #4) > The logfile should be cleaned at startup, so it's guaranteed that the file is > clean and the error-messages should tell the admin about the logfile ("A logfile > was created in blabla" or similar). > just my 2 cents :) The second patch does that...
Er.... (In reply to comment #5) > (In reply to comment #4) > > The logfile should be cleaned at startup, so it's guaranteed that the file is > > clean >8 > > The second patch does that... > >8 and the error-messages should tell the admin about the logfile ("A > logfile > > was created in blabla" or similar). What does "tell the admin" mean? Write something to the syslog?
(In reply to comment #4) > The logfile should be cleaned at startup, so it's guaranteed that the file is > clean and the error-messages should tell the admin about the logfile ("A logfile > was created in blabla" or similar). > just my 2 cents :) Let me get this straight. First of all, the patch *already* makes sure the logfile is cleaned using: echo > /var/log/eix-sync.log If you wish, you might of course replace echo with something like echo " >>> $(date) >>> $(uname -n)" >> /var/log/eix-sync.log for good measure, so that none of the old messages are lost. Other than that, I wouldn't know what you'd want to specifically tell every admin in the output that they couldn't learn elsewhere. 'emerge --sync|--metadata' both have their share of output, all of which is logged in /var/log/eix-sync.log. IMHO explaining this on at most two extra lines in eix(1) is a lot cleaner than adding fluff to the output that's sent to a console or through a mail system (when used in a cron job) to the admin. With the current script as patched, the output to the console/mail/ whateveryoufancy might look like this, when used with at(1): ------------------------------------- From: "root" <xyz@xyz.example.com> To: root Subject: Output from your job 3 Date: Thu, 17 Nov 2005 00:55:23 +0100 * Running emerge --metadata ... [ ok ] * Running update-eix ... [ ok ] Diffing databases (10291 - 10284 packages) << app-mobilephone/ussp-push (none): OBEX object push client for Linux << dev-php/onphp (none): onPHP is the GPL'ed multi-purpose object-oriented PHP framework. << media-video/ati-drivers (none): Ati precompiled drivers for r350, r300, r 250 and r200 chipsets << media-video/ati-drivers-extra (none): Ati precompiled drivers extra application << media-video/drip (none): A DVD to DIVX convertor frontend << sci-libs/charm (none): Charm++ is a message-passing parallel language and runtime system. << sys-libs/libkudzu-knoppix (none): Knoppix version of the Red Hat hardware detection tools ------------------------------------- That's all the information you need, I think. If something goes wrong with update-eix or emerge --sync|--metadata, it's logged to /var/log/eix-sync.log and the script returns this to stdout anyway: "Problems running [command]". I have a patch for the man page, if you like...
Created attachment 73050 [details, diff] eix-0.5.0_pre1-eix-sync-log-man.patch
Created attachment 73054 [details, diff] eix-0.5.0_pre1-eix-sync-log-man.patch This one applies to the eix.1.in in the source instead of to the installed one. 8-)
Created attachment 73056 [details, diff] eix-0.5.0_pre1-eix-sync-log-man.patch This time, the patch even corrects the assumption that eix-sync only runs 'emerge --sync' (and not 'emerge --metadata' as well if asked nicely).
Wops, you're right and I'am wrong .. sorry! I applied the patches upstream, thanks.
fixed in 0.5.0_pre2