Motivation: I tend to let the log files generated by the newer version of portage to build up without getting much more than a glance from me. I wanted a script to easily display the log files and have the ability to delete them from a list. It's a fairly small script with not much complication. Places were I have borrowed code have been noted and credited. At this time (March/06) the version of portage that contains the code that ebuilds use to generate elogs is masked. (At least for x86). Script: This script borrows from etc-update and attempts to provide a somewhat familiar interface for the easy viewing/deleting of elog generated log files Example: # elog-list portage elog files located in /var/tmp/elogs 1) net-wireless:madwifi-tools-0.1443.20060207:20060306-142252.log 2) net-wireless:madwifi-driver-0.1443.20060207:20060306-142458.log 3) net-wireless:wpa_supplicant-0.5.0-r1:20060306-143833.log 4) app-text:acroread-7.0.5-r2:20060307-130529.log 5) sys-fs:device-mapper-1.02.02:20060307-130637.log 6) app-arch:tar-1.15.1-r1:20060308-135801.log 7) app-crypt:gnupg-1.4.2.2:20060310-141131.log Please select a file to view by entering the corresponding number. (-1 to exit)
Created attachment 82252 [details] elog-list script to help view and delete portage generated elogs
Created attachment 82405 [details] elog display script version 0.0.3 Fixed a bug when the elog directory does not exist and tried to make the output nicer.
I gave this script a try...I noticed strange behavior that looks like a bug. 1) I have a reasonable large number of log files (~200). If I try to display the first 49-files it works as it should. However, for every number >49 it does not display the content of the logfile as it should. This is definitely unexpected behavior. Unfortunately I don't see where it goes wrong in the script, so I can't fix it. 2) My impression after giving this a try is that it is too much trouble to deal with this on a file by file basis. I would prefer to have something that shows me the content of these log-files for xx-files at the same time. Any suggestions for a script/tool to do this are welcome.
Created attachment 83854 [details] elog display script version 0.0.4 Thanks, moesasji that was a bug. I have corrected that in the attached ebuild. elog-list version 0.0.4
Created attachment 84042 [details] elog display script version 0.0.5 Removed a debug message
Now maintained in the sunrise overlay: http://overlays.gentoo.org/proj/sunrise/browser/sunrise/app-portage/elog-list
resolving as effort has been duplicated with eread