Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to track emerges/unmerges/syncs on your desktop.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
CitizenX
Apprentice
Apprentice


Joined: 11 Sep 2004
Posts: 158
Location: Fresno, CA

PostPosted: Tue Feb 01, 2005 12:01 pm    Post subject: How to track emerges/unmerges/syncs on your desktop. Reply with quote

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.

Code:
emerge genlop


This parses portage's log pretty clearly. Make sure you can run this as a user (sudo works for me).

Code:
emerge torsmo


We all know what this does, right? :wink:

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
View user's profile Send private message
ZmiyGorinich
Guru
Guru


Joined: 27 Feb 2004
Posts: 369
Location: Zaporizhzhe, Ukraine

PostPosted: Tue Feb 01, 2005 1:10 pm    Post subject: Reply with quote

Thanks, this is cool :)
Back to top
View user's profile Send private message
darkfolk
n00b
n00b


Joined: 30 Jan 2005
Posts: 32

PostPosted: Tue Feb 01, 2005 10:02 pm    Post subject: Reply with quote

Very useful tip, thanks.
Back to top
View user's profile Send private message
crishchun
n00b
n00b


Joined: 25 Jan 2005
Posts: 39
Location: /home/USA/NJ

PostPosted: Sat Feb 12, 2005 7:56 pm    Post subject: Reply with quote

Sweet! I love you genlop and torsmo!

Here's mine: http://pass16.dizinc.com/~nineonef/gentoo/snapshot.png
_________________
Dell Inspiron 8200
1.4GHz / Pentium4 / 256MB RAM
Gentoo 2.6.11-rc4-nitro1

Current desktop


Last edited by crishchun on Sun Feb 13, 2005 3:09 am; edited 1 time in total
Back to top
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Sat Feb 12, 2005 8:10 pm    Post subject: Reply with quote

I would like to add one:

Code:

emerge esearch


Lightning-fast replacement for emerge -s 8)
Back to top
View user's profile Send private message
adsmith
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1386
Location: NC, USA

PostPosted: Sat Feb 12, 2005 8:45 pm    Post subject: Reply with quote

esearch is dead. eix blows it away.
Back to top
View user's profile Send private message
WladyX
Guru
Guru


Joined: 25 Nov 2004
Posts: 503
Location: Romania

PostPosted: Sat Feb 12, 2005 8:51 pm    Post subject: Reply with quote

It is dead because you consider it dead, or they stoped working on it?
_________________
We are not alone.
Back to top
View user's profile Send private message
adsmith
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1386
Location: NC, USA

PostPosted: Sat Feb 12, 2005 8:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Sat Feb 12, 2005 9:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
WladyX
Guru
Guru


Joined: 25 Nov 2004
Posts: 503
Location: Romania

PostPosted: Sat Feb 12, 2005 9:41 pm    Post subject: Reply with quote

Same here for now :)
_________________
We are not alone.
Back to top
View user's profile Send private message
gentoo_lan
l33t
l33t


Joined: 08 Sep 2004
Posts: 890
Location: Charles Town, WV

PostPosted: Sat Feb 12, 2005 11:24 pm    Post subject: Reply with quote

I like esearch. When eix advances a little more I will probably try it but for now I will stick to esearch.
Back to top
View user's profile Send private message
CitizenX
Apprentice
Apprentice


Joined: 11 Sep 2004
Posts: 158
Location: Fresno, CA

PostPosted: Mon Feb 14, 2005 6:48 am    Post subject: Reply with quote

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. :D

And to add to the hijacked topic.....thanks adsmith :roll: 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
View user's profile Send private message
crishchun
n00b
n00b


Joined: 25 Jan 2005
Posts: 39
Location: /home/USA/NJ

PostPosted: Mon Feb 14, 2005 7:24 am    Post subject: Reply with quote

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. :D

And to add to the hijacked topic.....thanks adsmith :roll: 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
View user's profile Send private message
CitizenX
Apprentice
Apprentice


Joined: 11 Sep 2004
Posts: 158
Location: Fresno, CA

PostPosted: Mon Feb 14, 2005 10:37 am    Post subject: Reply with quote

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
View user's profile Send private message
crishchun
n00b
n00b


Joined: 25 Jan 2005
Posts: 39
Location: /home/USA/NJ

PostPosted: Mon Feb 14, 2005 4:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
crishchun
n00b
n00b


Joined: 25 Jan 2005
Posts: 39
Location: /home/USA/NJ

PostPosted: Mon Feb 14, 2005 8:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
ISANobody
n00b
n00b


Joined: 06 Aug 2004
Posts: 4
Location: UIUC

PostPosted: Sat Feb 26, 2005 1:24 am    Post subject: Reply with quote

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
View user's profile Send private message
_mikec_
Guru
Guru


Joined: 22 May 2004
Posts: 386

PostPosted: Thu Mar 03, 2005 5:01 am    Post subject: Reply with quote

sweet :D
_________________
(8 Mars 2005 - 07:52:46)
(18 September 2017 - 11:25:35)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum