Main index > About new desklets > Portage Tracker

By CitizenX (Themer / Graphic Artist), on Thu Mar 24 19:28:46 2005: Portage Tracker.

Ok I know I've already mentioned it in passing, but I was thinking of a Portage tracker to display recent emerges/unmerges and the last/next sync. Obviously this would be gentoo specific (well anything that uses portage really). I've gimped up some prelim images.

EmergeD images:
http://home.comcast.net/~iibagod/EmergeD_lastemerge.png
http://home.comcast.net/~iibagod/EmergeD_lastunmerge.png
http://home.comcast.net/~iibagod/EmergeD_sync.png

I missed the buttons on the bottom...my idea is that you could push a button (either one for all or a button for each option) to cycle through the different displays. Right now I have all that info on my screen and its a bit filling.

The script calls genlop, which parses/var/log/emerge.log to get the necessary information. Last sync is stored in /var/cache/edb/dep/timestamp.chk. I have emerge sync as a cron job, and add on a command:

Code:

--date="next week" +"%a %b %d %R" > /var/log/nextsync.log


Then I use torsmo to cat that log.

The desklet can simply parse /var/log/emerge.log , timestamp.chk, and next sync is optional for those who schedule syncs...but the instructions should be there on adding the extra cron job. One needs read access to these files to run the desklet, obviously.

By syfou (Core Developer & Desklet Author), on Thu Mar 24 20:22:25 2005: Tail-root?.

Ok, just a precision here: did you begin working on this, or is it just a proposal you make for others to pick up with some design ideas?

If it's only a design right now, I think you should probably approach things a bit differently, because you could achieve the same result while writing a generic (i.e. non portage-specific) desklet usable for other tasks as well while not having performance downside.

It appears to me that you could use a kind of generic tail-root, able to display some captions, background themes and a few possibly multi-lines ansi-escaped command output: this is not something overly complicated...

As for the buttons, it is a bit more work, but there is nothing impossible there. For my taste, I would rather use a wheel mouse of click for scrolling (as I did with quidnovi), but it is only me..

By CitizenX (Themer / Graphic Artist), on Thu Mar 24 21:49:54 2005.

Oh I havent started anything on this...its more of a proposal than anything else.

A tail-root would work if things are set up correctly....I have three cronjobs invoking genlop with separate parameters. The results are sent to seperate logs , which torsmo simply reads from. With that setup, a generic log reader would work...

I'm simply trying to cut down on all the scripting and streamline the process. The tracker could simply parse the logs themselves and display the text on a background image, displaying different text based on what option is selected (something quickly changed, which is why I was thinking of buttons). I'm not sure how much power that would take, so if it would be prohibitive, then other avenues need to be explored. I'm simply trying to provide something to solve this particular need. If it's a matter of providing a generic desklet, then modifying it for this specific use, I'm all for it. I can always provide a howto and custom artwork on the Gentoo Forums for anyone wanting to use it for portage.

By syfou (Core Developer & Desklet Author), on Thu Mar 24 22:03:51 2005.

Well, that's a nice proposition... I am a little short on time myself, but maybe someone else can take it, if you do not take a shot at it yourself of course. ;-)

From a programmatic point of view, doing this as a generic desklet or as a specific portage-oriented one is pretty much the same... By the way, I do not understand why you read logs instead of just plainly intercepting the output of genlop: if it's permission-related, why aren't you a member of the portage group on your own machine? But that's really a detail...

As for the ressources needed, that should make a pretty spartant desklet if coded right...Comparable to Weather in fact. I'll let you know in about a week if I have time to produce this, so we can test it together for your specific needs and maybe with your artwork, but I make no promise.

By CitizenX (Themer / Graphic Artist), on Fri Mar 25 00:17:28 2005.

I used to use genlop, but was tinkering with using torsmo to read the log instead of invoking genlop...I might go back to it, but for now torsmo just cats the log file instead of invoking genlop twice at the same time. Cron runs each genlop at differing times, resulting in half the load every 5 minutes rather than the full load every 10...which on my system slows down certain games and whatnot.

By DrWoland (Desklet Author), on Sat Mar 26 14:29:14 2005.

CitizenX wrote:

I used to use genlop, but was tinkering with using torsmo to read the log instead of invoking genlop...I might go back to it, but for now torsmo just cats the log file instead of invoking genlop twice at the same time. Cron runs each genlop at differing times, resulting in half the load every 5 minutes rather than the full load every 10...which on my system slows down certain games and whatnot.


I'm not doing any desklets work right now, but I also don't use a portage tracker so this is all a bit blurry. If you e-mail me the specific commands you're running that you want the output from, I could see if I can pick this up.

By syfou (Core Developer & Desklet Author), on Sat Mar 26 14:43:56 2005.

Dr. Woland,

here is a link to CitizenX way of doing things right now. In case you do it, you might want to support ansi-escaped output sequences to keep original terminal colors. Here is small, unrelated example to decode the appropriate sequences in python.

By CitizenX (Themer / Graphic Artist), on Sat Mar 26 15:32:00 2005.

Uh yeah, what he said.....;)

Actually, I've moved the genlop commands over into cron to put each one at differing times (and then realized I could have set different execi intervals...doh). This allows one to create a simple log reader to cat the logs I created. Right now my torsmo just cats each log. What I was looking for was a way to avoid having all three logs display at once, thereby freeing up desk space.
To avoid making something so gentoo specific, a multiple log reader could be created, one that allowed you to click a button and cycle through multiple logs. A sort of multi root-tail, which could read a few files and display the contents on the screen. There could be a parser in there, to clean up some logs, but it might not be totally necessary.
At that point, its just a matter of writing up a howto in the Gentoo Forums explaining how to redirect specific genlop commands to individual logs (emerge.log can get real long and messy if you let it). The desklet could be modified to do many things at that point, especially if the number of logs it could display was large enough.

By cs-cam (Desklet Author), on Thu Apr 14 00:48:57 2005.

I'm pretty new but I'm planning on writing a very similar desklet to this for Arch Linux rather than Gentoo. In essense the package manager is very similar so both desklets could probably share a large chuck of code without too many dramas. So far I've already got a base going, it parses a file (using Python) to get the distro version, nothing drastic.It also uses a Python library to the package manager to fetch all the packages installed, then I count then just for a "x number of packages installed" thing. I'm going to have an update button (not a widget, just clickable area) that will change the text displayed there while it syncs and downloads new packages.

http://www.myfilebin.com/userfiles/cam/adesklets001.jpg

That's what I have so far, now I got some ideas from my other thread I'll hopefully get it functional sometime soon, then I'll just need to write up parts to display last system-wide update, last packages updated and stuff like that. Shouldn't be too hard, is python quick enough to parse log files or should I write some bash scripts for that and feed python the output of them?


adesklets is proud to be hosted on:

SourceForge.net Logo

Back to adesklets.sf.net.