| View previous topic :: View next topic |
| Author |
Message |
CitizenX Apprentice


Joined: 11 Sep 2004 Posts: 158 Location: Fresno, CA
|
Posted: Tue Feb 01, 2005 12:01 pm Post subject: How to track emerges/unmerges/syncs on your desktop. |
|
|
I was doing this manually at first, using xpad, then somebody asked me what script I was using ....that got me thinking. With some help from psyqil, who provided the LAST EMERGED command that I spent hours trying to figure out (thanks man), we got a nice little script that'll allow you to see your last few emerges, unmerges, and your last sync.
This parses portage's log pretty clearly. Make sure you can run this as a user (sudo works for me).
We all know what this does, right?
edit your .torsmorc as follows (this is just the pertinent part):
| Code: | TEXT
LAST EMERGED:
${execi 180 sudo genlop -ln|tail -n 3}
LAST UNMERGED:
${execi 180 sudo genlop -un \.\*|grep \<\<\<|tail -n 3}
LAST SYNC:
${execi 180 cat /var/cache/edb/dep/timestamp.chk}
NEXT SYNC:
Saturday @ 00:30 (if you run a cron job)
|
This will give you the ability to see your last 3 emerges, last 3 unmerges, the date of your last sync, and your next sync if you're running it as a cron job. It's not perfect (I'd like to be able to automate that last line as well..), but its very functional. Heres my desktop with the modified torsmo:
http://www.lynucs.org/index.php?screen_id=142450857341ff6ca8b6885&p=screen
Hope this comes in handy. |
|
| Back to top |
|
 |
ZmiyGorinich Guru


Joined: 27 Feb 2004 Posts: 369 Location: Zaporizhzhe, Ukraine
|
Posted: Tue Feb 01, 2005 1:10 pm Post subject: |
|
|
Thanks, this is cool  |
|
| Back to top |
|
 |
darkfolk n00b

Joined: 30 Jan 2005 Posts: 32
|
Posted: Tue Feb 01, 2005 10:02 pm Post subject: |
|
|
| Very useful tip, thanks. |
|
| Back to top |
|
 |
crishchun n00b


Joined: 25 Jan 2005 Posts: 39 Location: /home/USA/NJ
|
|
| Back to top |
|
 |
j-m Retired Dev

Joined: 31 Oct 2004 Posts: 975
|
Posted: Sat Feb 12, 2005 8:10 pm Post subject: |
|
|
I would like to add one:
Lightning-fast replacement for emerge -s  |
|
| Back to top |
|
 |
adsmith Veteran

Joined: 26 Sep 2004 Posts: 1386 Location: NC, USA
|
Posted: Sat Feb 12, 2005 8:45 pm Post subject: |
|
|
| esearch is dead. eix blows it away. |
|
| Back to top |
|
 |
WladyX Guru


Joined: 25 Nov 2004 Posts: 503 Location: Romania
|
Posted: Sat Feb 12, 2005 8:51 pm Post subject: |
|
|
It is dead because you consider it dead, or they stoped working on it? _________________ We are not alone. |
|
| Back to top |
|
 |
adsmith Veteran

Joined: 26 Sep 2004 Posts: 1386 Location: NC, USA
|
Posted: Sat Feb 12, 2005 8:56 pm Post subject: |
|
|
I think it is really dead, or at least moribund. No work has been done on it since September. In any case, eix has a similar idea, but clearly outclasses esearch. Notably, updating the eix database only takes 6 seconds! (Athlon XP 2600)
By the way, I didn't mean to hijack the thread with that comment. Please return to your regularly scheduled discussion. The forums search will turn up other info on eix and esearch |
|
| Back to top |
|
 |
j-m Retired Dev

Joined: 31 Oct 2004 Posts: 975
|
Posted: Sat Feb 12, 2005 9:36 pm Post subject: |
|
|
Hmm, eix has been in portage for less then one month and is masked. Sorry, maybe later; esearch does the job fine for me...  |
|
| Back to top |
|
 |
WladyX Guru


Joined: 25 Nov 2004 Posts: 503 Location: Romania
|
Posted: Sat Feb 12, 2005 9:41 pm Post subject: |
|
|
Same here for now  _________________ We are not alone. |
|
| Back to top |
|
 |
gentoo_lan l33t


Joined: 08 Sep 2004 Posts: 887 Location: Osan AB, South Korea
|
Posted: Sat Feb 12, 2005 11:24 pm Post subject: |
|
|
I like esearch. When eix advances a little more I will probably try it but for now I will stick to esearch. _________________ Registered Linux user# 375038. |
|
| Back to top |
|
 |
CitizenX Apprentice


Joined: 11 Sep 2004 Posts: 158 Location: Fresno, CA
|
Posted: Mon Feb 14, 2005 6:48 am Post subject: |
|
|
duh ok I figured out how to automate the last line as well....
in your cron job, send the date of next week to a file
| Code: | | date --date="next week" > /var/log/nextemerge.log |
then in your .torsmorc, display that file:
| Code: | | cat /var/log/nextemerge.log |
I knew it was simple....just had to figure it out.
And to add to the hijacked topic.....thanks adsmith I've used esearch but i hate having to remember eupdated (or whatever its called) ...eix seems to work just fine for me. My computer's so slow sometimes its easier to just look at www.gentoo-portage.com to see if theres a package I'm looking to install (obviously not to see what version I've got installed) |
|
| Back to top |
|
 |
crishchun n00b


Joined: 25 Jan 2005 Posts: 39 Location: /home/USA/NJ
|
Posted: Mon Feb 14, 2005 7:24 am Post subject: |
|
|
| CitizenX wrote: | duh ok I figured out how to automate the last line as well....
in your cron job, send the date of next week to a file
| Code: | | date --date="next week" > /var/log/nextemerge.log |
then in your .torsmorc, display that file:
| Code: | | cat /var/log/nextemerge.log |
I knew it was simple....just had to figure it out.
And to add to the hijacked topic.....thanks adsmith I've used esearch but i hate having to remember eupdated (or whatever its called) ...eix seems to work just fine for me. My computer's so slow sometimes its easier to just look at www.gentoo-portage.com to see if theres a package I'm looking to install (obviously not to see what version I've got installed) |
Thanks! But do you know how to display the last sync date/time according to my UTC? Mine's UTC-5 so the time displayed is five hours off. Not a biggie just wondering.  _________________ Dell Inspiron 8200
1.4GHz / Pentium4 / 256MB RAM
Gentoo 2.6.11-rc4-nitro1
Current desktop |
|
| Back to top |
|
 |
CitizenX Apprentice


Joined: 11 Sep 2004 Posts: 158 Location: Fresno, CA
|
Posted: Mon Feb 14, 2005 10:37 am Post subject: |
|
|
lol yeah I just figured out that I wasnt seeing the last sync command right.....I've moved most of this into cron so I don't have to mess up my .torsmorc with a bunch of execi's ....but here's what I've got
in crontab:
| Code: |
genlop -ln|tail -n 3| awk '{print $1, $2, $3, $4, $7}' > /var/log/lastemerged.log
genlop -un \.\*|grep \<\<\<|tail -n 3| awk '{print $1, $2, $3, $4, $7}' > /var/log/lastunmerged.log
genlop -rn|tail -n 1|awk '{print $4, $5, $6, $7}' > /var/log/lastsync.log |
then i just set my torsmo to cat the logs:
| Code: | ${execi 180 cat /var/log/lastemerged.log
and so on....
|
I don't know why /var/cache/edb/dep/timestamp.chk is in UTC....maybe someone knows how to change that? maybe it has something to do with LOCAL in /etc/rc.conf? I couldn't find anything so I worked this out. |
|
| Back to top |
|
 |
crishchun n00b


Joined: 25 Jan 2005 Posts: 39 Location: /home/USA/NJ
|
Posted: Mon Feb 14, 2005 4:50 pm Post subject: |
|
|
| CitizenX wrote: | lol yeah I just figured out that I wasnt seeing the last sync command right.....I've moved most of this into cron so I don't have to mess up my .torsmorc with a bunch of execi's ....but here's what I've got
in crontab:
| Code: |
genlop -ln|tail -n 3| awk '{print $1, $2, $3, $4, $7}' > /var/log/lastemerged.log
genlop -un \.\*|grep \<\<\<|tail -n 3| awk '{print $1, $2, $3, $4, $7}' > /var/log/lastunmerged.log
genlop -rn|tail -n 1|awk '{print $4, $5, $6, $7}' > /var/log/lastsync.log |
then i just set my torsmo to cat the logs:
| Code: | ${execi 180 cat /var/log/lastemerged.log
and so on....
|
I don't know why /var/cache/edb/dep/timestamp.chk is in UTC....maybe someone knows how to change that? maybe it has something to do with LOCAL in /etc/rc.conf? I couldn't find anything so I worked this out. |
Ahh.. it was so simple thanks to a peek at the date man page. Now everything looks pretty.
| Code: | | ${execi 180 date --date="`cat /var/cache/edb/dep/timestamp.chk`" +%c} |
_________________ Dell Inspiron 8200
1.4GHz / Pentium4 / 256MB RAM
Gentoo 2.6.11-rc4-nitro1
Current desktop |
|
| Back to top |
|
 |
crishchun n00b


Joined: 25 Jan 2005 Posts: 39 Location: /home/USA/NJ
|
Posted: Mon Feb 14, 2005 8:38 pm Post subject: |
|
|
I sync every Friday 00:45 so I use this but I'm glad to see there are other ways to do this.
| Code: | | ${execi 180 date --date="next friday 00:45" +%c} |
_________________ Dell Inspiron 8200
1.4GHz / Pentium4 / 256MB RAM
Gentoo 2.6.11-rc4-nitro1
Current desktop |
|
| Back to top |
|
 |
ISANobody n00b

Joined: 06 Aug 2004 Posts: 4 Location: UIUC
|
Posted: Sat Feb 26, 2005 1:24 am Post subject: |
|
|
| Here at school I am limited to webrsyncing, genlop does not seem to handle this. Is there a way to work around this? |
|
| Back to top |
|
 |
_mikec_ Guru


Joined: 22 May 2004 Posts: 386
|
Posted: Thu Mar 03, 2005 5:01 am Post subject: |
|
|
sweet  _________________ (8 Mar 2005 - 07:52:46) |
|
| Back to top |
|
 |
|