Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
esync - script to show updates of an 'emerge sync'
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
haceye
Apprentice
Apprentice


Joined: 22 May 2003
Posts: 187
Location: Stuttgart, Germany

PostPosted: Thu Jan 08, 2004 4:47 pm    Post subject: Reply with quote

Hi,

I really love such one-liners, and it's pretty useful, but it does sth. else than esync.

esync only shows the packages that are updated during an `emerge sync. If you run a second esync directly after the first one, you probably won't see any packages updated.

David
_________________
faster 'emerge -s'? emerge esearch
Back to top
View user's profile Send private message
Khan
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2003
Posts: 96

PostPosted: Fri Jan 09, 2004 11:53 am    Post subject: Reply with quote

I'm getting 2 different errors:

avenger esync # eupdatedb
Traceback (most recent call last):
File "/usr/sbin/eupdatedb", line 7, in ?
from output import red, darkgreen, green, bold, nocolor
ImportError: No module named output

then

avenger esync # ./esync
Traceback (most recent call last):
File "./esync", line 9, in ?
import portage
ImportError: No module named portage

Any idea what's going on here?

-ac
Back to top
View user's profile Send private message
haceye
Apprentice
Apprentice


Joined: 22 May 2003
Posts: 187
Location: Stuttgart, Germany

PostPosted: Fri Jan 09, 2004 12:33 pm    Post subject: Reply with quote

hi,

Please try to re-emerge python. This sould work. I don't know exactly yet, but I think this is a problem of portage. Will probably be fixed in next esearch.

David
_________________
faster 'emerge -s'? emerge esearch
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Sat Jan 10, 2004 9:27 pm    Post subject: Reply with quote

Um, am I doing something wrong? Running eupdatedb the first time took 20 minutes! Is that normal?
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
haceye
Apprentice
Apprentice


Joined: 22 May 2003
Posts: 187
Location: Stuttgart, Germany

PostPosted: Sat Jan 10, 2004 11:41 pm    Post subject: Reply with quote

Hi,

I'm currently working on the next esearch version. I did some research and I think I found an error/strange behaviour in portage. Maybe the next version of eupdatedb will be faster (with changes in portage.py?)

20 minutes are really long, but I think if you run eupdatedb again, it will run a little bit faster.

David
_________________
faster 'emerge -s'? emerge esearch
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Sun Jan 11, 2004 12:22 am    Post subject: Reply with quote

Yah, the second time it ran under 2 minutes. But when I did emerge sync, and ran eupdatedb, it was going slowly again. :T
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
haceye
Apprentice
Apprentice


Joined: 22 May 2003
Posts: 187
Location: Stuttgart, Germany

PostPosted: Mon Jan 12, 2004 3:40 pm    Post subject: Reply with quote

Sorry, but I'm just bumping this thread, because there is an update:

esync is now in portage (shipped with app-portage/esearch-0.5.3). See my first post for details

Thanks,

David
_________________
faster 'emerge -s'? emerge esearch
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Sun Feb 08, 2004 5:41 pm    Post subject: Reply with quote

I just updated and got
Code:
 * Getting old portage tree
 * Doing 'emerge sync' now

 * Doing 'eupdatedb' now

 * indexing: 699 ebuilds to go
!!! Problem with determining the name/location of an ebuild.
!!! Please report this on IRC and bugs if you are not causing it.
!!! mycpv:   sys-devel/hardened-gcc-4.0-3.3.2-r1
!!! mysplit: ['sys-devel', 'hardened-gcc-4.0-3.3.2-r1']
!!! psplit:  None
!!! error:   unsubscriptable object


 * Getting new portage tree
 * Preparing databases
 * Searching for changes
:(
Back to top
View user's profile Send private message
shanghai
Guru
Guru


Joined: 08 Feb 2004
Posts: 493
Location: Roma, Italia, GeekLand

PostPosted: Tue Feb 10, 2004 10:45 am    Post subject: Reply with quote

I've got this error launching esync for the first time.
I did eupdatedb and esearch seems working
Code:

Getting old portage tree
Traceback (most recent call last):
  File "/usr/sbin/esync", line 33, in ?
    tree_old = gettree("old")
  File "/usr/sbin/esync", line 25, in gettree
    os.symlink("/var/cache/edb/esearchdb.pyc", tmp_prefix + tree + "tree.pyc")
OSError: [Errno 17] File exists


What's wrong?
Back to top
View user's profile Send private message
haceye
Apprentice
Apprentice


Joined: 22 May 2003
Posts: 187
Location: Stuttgart, Germany

PostPosted: Tue Feb 10, 2004 12:11 pm    Post subject: Reply with quote

Hi,

Please update to esearch-0.6 (~x86)

David
_________________
faster 'emerge -s'? emerge esearch
Back to top
View user's profile Send private message
kKDu
Apprentice
Apprentice


Joined: 18 Aug 2003
Posts: 187

PostPosted: Fri Feb 20, 2004 12:08 am    Post subject: Reply with quote

What's about this nice feature?

At the end of /usr/sbin/esync:
Code:
emsg("Searching for changes")
old_keys = old.keys()
for (pkg, version) in new.items():
    if pkg not in old_keys:
        os.system("esearch -c ^" + pkg.split("/")[1] + "$ | head -n1")
        # begin kKDu
        os.system("esearch ^" + pkg.split("/")[1] + "$ | awk 'NR==8 { print $0 }'")
        # end kKDu
    elif old[pkg] != new[pkg]:
        os.system("esearch -c ^" + pkg.split("/")[1] + "$ | head -n1")
        # begin kKDu
        os.system("esearch ^" + pkg.split("/")[1] + "$ | awk 'NR==8 { print $0 }'")
        #end kKDu


This shows the URL of every new package, so if you run esync in a gnome-terminal you can very quick launching the link and get more information about the package.
_________________
http://www.vim.org
Back to top
View user's profile Send private message
haceye
Apprentice
Apprentice


Joined: 22 May 2003
Posts: 187
Location: Stuttgart, Germany

PostPosted: Fri Feb 20, 2004 12:53 am    Post subject: Reply with quote

Hi,

I already thougt about showing the homepage, too. This code is quite ugly, you sould take a look at the -o/--own option of esearch ;-)

Anyway, thanks for the tip.

David
_________________
faster 'emerge -s'? emerge esearch
Back to top
View user's profile Send private message
kKDu
Apprentice
Apprentice


Joined: 18 Aug 2003
Posts: 187

PostPosted: Wed Mar 03, 2004 10:41 am    Post subject: Reply with quote

I'm very confused.
I have portage-2.0.50-r1, python-2.3.3, esearch-0.6.
If I run esync, eupdatedb needs about 50(!) minutes to finish.
With portage-2.0.49 it needs only 4 minutes!
_________________
http://www.vim.org
Back to top
View user's profile Send private message
Hackeron
Guru
Guru


Joined: 01 Nov 2002
Posts: 307

PostPosted: Wed Mar 03, 2004 11:04 am    Post subject: Reply with quote

http://david-peter.de/esync/esync ----- link is dead, file no longer exists.
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Wed Mar 03, 2004 11:19 am    Post subject: Reply with quote

Hackeron wrote:
http://david-peter.de/esync/esync ----- link is dead, file no longer exists.


It is now part of apps-portage/esearch - just emerge that and you'll have esync as well ;-)

greetz
Stefan
Back to top
View user's profile Send private message
Zaister
n00b
n00b


Joined: 08 Apr 2004
Posts: 20
Location: Germany

PostPosted: Thu Apr 08, 2004 8:05 am    Post subject: Reply with quote

Great script! I have one small feature request, though. Would you be able to add an option for esync to use "emerge-webrsync" instead of "emerge sync" for those of us behind firewalls?

Regards,
Stefan.
Back to top
View user's profile Send private message
haceye
Apprentice
Apprentice


Joined: 22 May 2003
Posts: 187
Location: Stuttgart, Germany

PostPosted: Thu Apr 08, 2004 11:22 am    Post subject: Reply with quote

Hi,

I have already implemented this option, you just have to wait for the next version of esearch.

David
_________________
faster 'emerge -s'? emerge esearch
Back to top
View user's profile Send private message
shanghai
Guru
Guru


Joined: 08 Feb 2004
Posts: 493
Location: Roma, Italia, GeekLand

PostPosted: Thu Apr 08, 2004 3:10 pm    Post subject: Reply with quote

Hi everyone,
i've a feature request... I added a line
Code:
%daily * * mailsync | mailx -s "Ultimo mailsync"

to my crontab. I also changed two lines in esync to disable esearch from adding colours to the output, and renamed the change as mailsync (i just added -n in the options :) ). But i can't really write python still, so could you please write a tweak of esync that:
a) prepares the output for an email (colours formatted in html or whatever)
b) orders the output in the way that the updates come up listed before than the new packages
c) it's possible to add the changelogs to the output

I'd write it on my own but as i said i can't write python scripts still.
Thank you.
Nice work!!!
Shanghai.
_________________
Il sonno della ragione genera mostri.
Back to top
View user's profile Send private message
haceye
Apprentice
Apprentice


Joined: 22 May 2003
Posts: 187
Location: Stuttgart, Germany

PostPosted: Sat Apr 10, 2004 9:52 am    Post subject: Reply with quote

shanghai wrote:
Hi everyone,
i've a feature request... I added a line
Code:
%daily * * mailsync | mailx -s "Ultimo mailsync"

to my crontab. I also changed two lines in esync to disable esearch from adding colours to the output, and renamed the change as mailsync (i just added -n in the options :) ).


Hi,

This feature is already implemented ;-) (as webrsync, see above) Wait for the next version, than you can do

Code:
esync -n


shanghai wrote:
But i can't really write python still, so could you please write a tweak of esync that:
a) prepares the output for an email (colours formatted in html or whatever)


Hm, maybe ... I will think about it.

shanghai wrote:
b) orders the output in the way that the updates come up listed before than the new packages


I have already implemented a alphabetic sort for the next version, but your idea isn't bad, either.

shanghai wrote:
c) it's possible to add the changelogs to the output


To see "version bump" 100 times? :-)

shanghai wrote:
I'd write it on my own but as i said i can't write python scripts still.
Thank you.
Nice work!!!


Thanks,

David
_________________
faster 'emerge -s'? emerge esearch
Back to top
View user's profile Send private message
shanghai
Guru
Guru


Joined: 08 Feb 2004
Posts: 493
Location: Roma, Italia, GeekLand

PostPosted: Sat Apr 10, 2004 11:02 am    Post subject: Reply with quote

haceye wrote:

shanghai wrote:
c) it's possible to add the changelogs to the output


To see "version bump" 100 times? :-)

I use to read the changelogs because if i don't see any change useful for me (example "~ppc stable" ... ) i add that package version to package.mask and i avoid an useless time consuming update... 8)
_________________
Il sonno della ragione genera mostri.
Back to top
View user's profile Send private message
vificunero
Apprentice
Apprentice


Joined: 25 Jul 2003
Posts: 244
Location: Milan Italy EU

PostPosted: Fri Apr 30, 2004 9:22 am    Post subject: Reply with quote

Hi nice script. Thank's.
I wonder if it could be nice to insert a
Code:
gensync bmg-main

option too.
I don't know python so I'd like to know how could I add it to esync.
Thank's again.
_________________
vificunero@jabber.org
Back to top
View user's profile Send private message
deepthink
n00b
n00b


Joined: 25 Mar 2003
Posts: 35

PostPosted: Mon Jun 07, 2004 10:54 am    Post subject: Added a couple of options. Reply with quote

I run esync from /etc/cron.daily/esync.cron and so I added a few options to make the email recieved from cron more readable.
Code:
esync (0.1) - Run 'emerge sync' and show updated ebuilds
 
Usage: esync [ options ]
Options:
  --help, -h
    Print this help message
 
  --bmg, -b
    Enable break my gentoo main tree
 
  --nocolor, -n
    Don't use ANSI codes for colored output
 
  --quiet, -q
    Print only summary

The complete script is here
Hope you like it.
Back to top
View user's profile Send private message
juppe22
n00b
n00b


Joined: 10 Jun 2003
Posts: 74

PostPosted: Sun Aug 08, 2004 10:24 pm    Post subject: Re: Added a couple of options. Reply with quote

deepthink wrote:
I run esync from /etc/cron.daily/esync.cron and so I added a few options to make the email recieved from cron more readable.
Code:
esync (0.1) - Run 'emerge sync' and show updated ebuilds
 
Usage: esync [ options ]
Options:
  --help, -h
    Print this help message
 
  --bmg, -b
    Enable break my gentoo main tree
 
  --nocolor, -n
    Don't use ANSI codes for colored output
 
  --quiet, -q
    Print only summary

The complete script is here
Hope you like it.


This is really nice, but could you add bmg-gnome-current also...

Code:

gensync bmg-gnome-current


TIA
Back to top
View user's profile Send private message
deepthink
n00b
n00b


Joined: 25 Mar 2003
Posts: 35

PostPosted: Tue Aug 10, 2004 6:29 am    Post subject: Reply with quote

Script updated at the same location.

Added the following flags.
Code:
  --gnome, -g
    Enable break my gentoo current gnome tree (gensync bmg-gnome-current)
Back to top
View user's profile Send private message
juppe22
n00b
n00b


Joined: 10 Jun 2003
Posts: 74

PostPosted: Tue Aug 10, 2004 6:49 pm    Post subject: Reply with quote

deepthink wrote:
Script updated at the same location.

Added the following flags.
Code:
  --gnome, -g
    Enable break my gentoo current gnome tree (gensync bmg-gnome-current)

Thank you!! :D
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
Goto page Previous  1, 2
Page 2 of 2

 
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