Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pye - "pick your emerge" script
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
deepthought
Guru
Guru


Joined: 04 Apr 2003
Posts: 321
Location: icbm://5131''N:0710''E

PostPosted: Tue Feb 17, 2004 7:14 pm    Post subject: Reply with quote

An option for *excluding* would be nice, like "emerge everything but foo-misc/bar". Could be done by specifying -<number> on input. At least, that's what I would need...

Regards,
Alexander
_________________
Out of loyalty to its disregarded comrades, this message feels free to ignore the reader.
Registered Linux User #317705
Back to top
View user's profile Send private message
dr_strange
Guru
Guru


Joined: 16 Apr 2002
Posts: 480
Location: Cambridge, UK

PostPosted: Tue Feb 17, 2004 7:20 pm    Post subject: Reply with quote

Good idea. I'll do it.
_________________
shine on,

dr_strange

Set the Controls for the Heart of Gentoo
http://magenta.linuxforum.hu
Back to top
View user's profile Send private message
dr_strange
Guru
Guru


Joined: 16 Apr 2002
Posts: 480
Location: Cambridge, UK

PostPosted: Tue Feb 17, 2004 8:56 pm    Post subject: Reply with quote

Well, I have updated the script again. Now you can specify packages to be emerged (1,3-6,11,13-23) OR packages to be excluded from the list (!3,6-9,11).

Use at your own risk... :P
_________________
shine on,

dr_strange

Set the Controls for the Heart of Gentoo
http://magenta.linuxforum.hu
Back to top
View user's profile Send private message
revertex
l33t
l33t


Joined: 23 Apr 2003
Posts: 806

PostPosted: Wed Feb 18, 2004 3:27 am    Post subject: Reply with quote

wrc1944 wrote:
Sorry to be so dense, but could you please clarify where you put pye (like in /usr/bin/, or somewhere else??), and what commands one uses to run it, and what permissions it needs? I can't seem to get this to run.

Thanks,
wrc1944

Is'nt
Code:
/usr/local/bin
the right place?
Back to top
View user's profile Send private message
singular
n00b
n00b


Joined: 07 Jun 2003
Posts: 54

PostPosted: Wed Feb 18, 2004 3:58 am    Post subject: Reply with quote

dr_strange wrote:
Hehh... you will not believe me, but after facing a 40-item list after a pye gnome yesterday, I went to bed with the thought "I will write in a range-functionality tomorrow". But you do my work for me, thanks:-)


Funny thing is, is that was pretty much the same reason that I thought of it. I had a long list of updates and didn't really feel like entering in a bunch of numbers either. So yeah, I do believe you :)

Anyway, great job, and I like the exclusion option too.
Back to top
View user's profile Send private message
deepthought
Guru
Guru


Joined: 04 Apr 2003
Posts: 321
Location: icbm://5131''N:0710''E

PostPosted: Wed Feb 18, 2004 7:27 am    Post subject: Reply with quote

Nice work -- kudos from me.

Regards,
Alexander
_________________
Out of loyalty to its disregarded comrades, this message feels free to ignore the reader.
Registered Linux User #317705
Back to top
View user's profile Send private message
scharkalvin
Guru
Guru


Joined: 31 Jan 2004
Posts: 331
Location: south florida

PostPosted: Fri Feb 20, 2004 12:35 am    Post subject: emerge error log? Reply with quote

Not being a python person (except for 'Monty' that is) I wonder if anybody has figured out a way to get emerge to save important error messages during an emerge -u world before they fly off the top of the screen to be lost forever! If emerge keeps an error log it's new to me.
Back to top
View user's profile Send private message
revertex
l33t
l33t


Joined: 23 Apr 2003
Posts: 806

PostPosted: Fri Feb 20, 2004 2:33 am    Post subject: Re: emerge error log? Reply with quote

scharkalvin wrote:
Not being a python person (except for 'Monty' that is) I wonder if anybody has figured out a way to get emerge to save important error messages during an emerge -u world before they fly off the top of the screen to be lost forever! If emerge keeps an error log it's new to me.

You can use a prog called "script", just type "script" in a terminal before do your emerge.
Script will create a file called typescript, with all terminal output.
Not exactly what you looking for, but a good solution IMHO.
Another way is use the follows command:
Code:
emerge -up word  2>&1 | tee -a /where_you_want_place_your_log/emerge.log
(not tested with pye, but will be wonderful if dr_strange can implement this feature)
cheers
Back to top
View user's profile Send private message
dr_strange
Guru
Guru


Joined: 16 Apr 2002
Posts: 480
Location: Cambridge, UK

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

There is /var/log/emerge if you specified it in make.conf.
_________________
shine on,

dr_strange

Set the Controls for the Heart of Gentoo
http://magenta.linuxforum.hu
Back to top
View user's profile Send private message
CaribbeanKnight
Apprentice
Apprentice


Joined: 27 Apr 2003
Posts: 240
Location: Earth -> Europe -> Belgium -> Diest

PostPosted: Fri Feb 20, 2004 8:02 am    Post subject: Reply with quote

hmmm, i found a problem running this script...
it seems that every packet that pye gives you to choose from gets added to my world file... what i don't always want off course...
i mean, let's say i want to do an emerge of xine-ui and it wants to emerge xine-lib also (cos of the dependency)... now when i do this using 'emerge xine-ui' only xine-ui gets added to my world file, what i want...
but if i do pye xine-ui and then select all numbers both files get added to my world file.....
could something be done that this behaviour doesn't occur..?
Back to top
View user's profile Send private message
dr_strange
Guru
Guru


Joined: 16 Apr 2002
Posts: 480
Location: Cambridge, UK

PostPosted: Fri Feb 20, 2004 10:31 am    Post subject: Reply with quote

I do not really understand what you mean but all this script does is to match the package names to the selected numbers, then calls 'emerge' with this list of packages appended.
_________________
shine on,

dr_strange

Set the Controls for the Heart of Gentoo
http://magenta.linuxforum.hu
Back to top
View user's profile Send private message
CaribbeanKnight
Apprentice
Apprentice


Joined: 27 Apr 2003
Posts: 240
Location: Earth -> Europe -> Belgium -> Diest

PostPosted: Sat Feb 21, 2004 4:34 am    Post subject: Reply with quote

yes, i know and that's where the problem i'm describing lies... the fact that your script calls an 'emerge' for every package in the list causes that every packet on that list is added to the world file... and that's not how it's supposed to work, normaly, if you emerge a package with emerge it only adds that package to the world file, not the packages it's depending on...
see what i mean..?
i allready thought about adding '--oneshot' to the emerge command in your script, but then it never adds anything to the world file, but that's not what i want either... :?
Back to top
View user's profile Send private message
dr_strange
Guru
Guru


Joined: 16 Apr 2002
Posts: 480
Location: Cambridge, UK

PostPosted: Sat Feb 21, 2004 2:43 pm    Post subject: Reply with quote

New version is up. Changes:

- previous versions did not catch blockers at all. Now they are filtered and printed.
- up to now -Up was always implied. From now on pye is simply a wrapper around emerge, so you can pass all options that emerge accepts, so pye -up system or pye -Up world or pye -p gnome all are okay. Or maybe I think I'll hardwire -p into the script, to avoid errors.

Hm. Maybe I should hack this right into emerge? Like emerge -x world, and you get a numbered list...
_________________
shine on,

dr_strange

Set the Controls for the Heart of Gentoo
http://magenta.linuxforum.hu
Back to top
View user's profile Send private message
deadaim
Guru
Guru


Joined: 27 Oct 2003
Posts: 467
Location: Florida

PostPosted: Sat Feb 21, 2004 3:22 pm    Post subject: Reply with quote

dr_strange, perhaps you can fix CaribbeanKnight's problem by adding --oneshot as an option and then editing the world file appropriately.

BTW, great script! I love it! 8)
Back to top
View user's profile Send private message
dr_strange
Guru
Guru


Joined: 16 Apr 2002
Posts: 480
Location: Cambridge, UK

PostPosted: Wed Feb 25, 2004 10:37 pm    Post subject: Reply with quote

There is a new version up on dev.gentoo.org/~strangedr

Changes:

- the script now recognizes the following options when confirming the list of emergeables:
's' as "step-emerge"; this calls emerge separately for each package given. The advantage of this is that the whole emerge chain is not broken if a package fails. At the end it gives a digest of what has been emerged and which packag(es) failed. TODO: check if a package is a dependency of a previously failed package and skip it altogether.
'm' as "mass-emerge"; emerge is given a list and emerges in one batch, as in previous versions of the script. Use this if you are confident nothing will fail.

- some small changes in code to use some portage functions
_________________
shine on,

dr_strange

Set the Controls for the Heart of Gentoo
http://magenta.linuxforum.hu
Back to top
View user's profile Send private message
wschlich
Retired Dev
Retired Dev


Joined: 06 Sep 2002
Posts: 41
Location: Bonn, North Rhine-Westphalia, Germany, Old Europe

PostPosted: Wed Feb 25, 2004 10:44 pm    Post subject: Reply with quote

well, I tried to run "pye -Dupv world" and always get the following errors:

1. entering "!6" (to emerge all but 6)

Traceback (most recent call last):
File "./pye.py", line 100, in ?
packlist = [pkgdict[item][1] for item in totallist if str(item) not in packnumlist]
TypeError: unsubscriptable object

2. entering "0-5,7-8" (to emerge all but 6)

Traceback (most recent call last):
File "./pye.py", line 106, in ?
packlist.append(pkgdict[n][1])
TypeError: unsubscriptable object

wtf?! :-)
_________________
Wolfram Schlich <wschlich@gentoo.org>
https://github.com/wschlich/ * http://dev.gentoo.org/~wschlich/ * http://wolfram.schlich.org/
Back to top
View user's profile Send private message
neenee
Veteran
Veteran


Joined: 20 Jul 2003
Posts: 1786

PostPosted: Wed Feb 25, 2004 10:47 pm    Post subject: Reply with quote

hm. i like it, but it's becoming a bit confusing;
especially the multiple help-outputs mentioned
in the script.
Back to top
View user's profile Send private message
Kristleifur
n00b
n00b


Joined: 04 Jan 2004
Posts: 41
Location: Iceland

PostPosted: Wed Feb 25, 2004 10:48 pm    Post subject: Reply with quote

Very cool. I was looking this exact thing a while ago. Thanks.
Back to top
View user's profile Send private message
wschlich
Retired Dev
Retired Dev


Joined: 06 Sep 2002
Posts: 41
Location: Bonn, North Rhine-Westphalia, Germany, Old Europe

PostPosted: Wed Feb 25, 2004 10:56 pm    Post subject: Reply with quote

wschlich wrote:
well, I tried to run "pye -Dupv world" and always get the following errors:

1. entering "!6" (to emerge all but 6)

Traceback (most recent call last):
File "./pye.py", line 100, in ?
packlist = [pkgdict[item][1] for item in totallist if str(item) not in packnumlist]
TypeError: unsubscriptable object

2. entering "0-5,7-8" (to emerge all but 6)

Traceback (most recent call last):
File "./pye.py", line 106, in ?
packlist.append(pkgdict[n][1])
TypeError: unsubscriptable object

wtf?! :-)


I found the pkg which causes problems:

pye -Dupv world wrote:

3): [ebuild N ] sys-kernel/grsec-sources-2.4.25.1.9.14 -build 0 kB


maybe it's something with the version number that confuses pye...
_________________
Wolfram Schlich <wschlich@gentoo.org>
https://github.com/wschlich/ * http://dev.gentoo.org/~wschlich/ * http://wolfram.schlich.org/
Back to top
View user's profile Send private message
christsong84
Veteran
Veteran


Joined: 06 Apr 2003
Posts: 1003
Location: GMT-8 (Spokane)

PostPosted: Wed Feb 25, 2004 11:03 pm    Post subject: Reply with quote

revertex wrote:
wrc1944 wrote:
Sorry to be so dense, but could you please clarify where you put pye (like in /usr/bin/, or somewhere else??), and what commands one uses to run it, and what permissions it needs? I can't seem to get this to run.

Thanks,
wrc1944

Is'nt
Code:
/usr/local/bin
the right place?


so long as it's n your path it doesn't matter.../bin.../usr/bin.../usr/local/bin...it's really up to you :)
_________________
while(true) {self.input(sugar);} :twisted:
Back to top
View user's profile Send private message
dr_strange
Guru
Guru


Joined: 16 Apr 2002
Posts: 480
Location: Cambridge, UK

PostPosted: Wed Feb 25, 2004 11:32 pm    Post subject: Reply with quote

wschlich: I think I have found the bug, please try it again.
_________________
shine on,

dr_strange

Set the Controls for the Heart of Gentoo
http://magenta.linuxforum.hu
Back to top
View user's profile Send private message
dr_strange
Guru
Guru


Joined: 16 Apr 2002
Posts: 480
Location: Cambridge, UK

PostPosted: Wed Feb 25, 2004 11:34 pm    Post subject: Reply with quote

wschlich wrote:
wschlich wrote:
well, I tried to run "pye -Dupv world" and always get the following errors:

1. entering "!6" (to emerge all but 6)

Traceback (most recent call last):
File "./pye.py", line 100, in ?
packlist = [pkgdict[item][1] for item in totallist if str(item) not in packnumlist]
TypeError: unsubscriptable object

2. entering "0-5,7-8" (to emerge all but 6)

Traceback (most recent call last):
File "./pye.py", line 106, in ?
packlist.append(pkgdict[n][1])
TypeError: unsubscriptable object

wtf?! :-)


I found the pkg which causes problems:

pye -Dupv world wrote:

3): [ebuild N ] sys-kernel/grsec-sources-2.4.25.1.9.14 -build 0 kB


maybe it's something with the version number that confuses pye...


It was not the version number, there was a bug in the parsethis() function. It looked for a [] tag of the previously installed version, but of course for a N version there is no such tag.
_________________
shine on,

dr_strange

Set the Controls for the Heart of Gentoo
http://magenta.linuxforum.hu
Back to top
View user's profile Send private message
wschlich
Retired Dev
Retired Dev


Joined: 06 Sep 2002
Posts: 41
Location: Bonn, North Rhine-Westphalia, Germany, Old Europe

PostPosted: Thu Feb 26, 2004 7:56 am    Post subject: Reply with quote

works :) thanks.
_________________
Wolfram Schlich <wschlich@gentoo.org>
https://github.com/wschlich/ * http://dev.gentoo.org/~wschlich/ * http://wolfram.schlich.org/
Back to top
View user's profile Send private message
wschlich
Retired Dev
Retired Dev


Joined: 06 Sep 2002
Posts: 41
Location: Bonn, North Rhine-Westphalia, Germany, Old Europe

PostPosted: Thu Feb 26, 2004 7:57 am    Post subject: Reply with quote

btw., it would be nice to have pye versioned so that people know something has changed etc.
_________________
Wolfram Schlich <wschlich@gentoo.org>
https://github.com/wschlich/ * http://dev.gentoo.org/~wschlich/ * http://wolfram.schlich.org/
Back to top
View user's profile Send private message
dr_strange
Guru
Guru


Joined: 16 Apr 2002
Posts: 480
Location: Cambridge, UK

PostPosted: Thu Feb 26, 2004 8:11 am    Post subject: Reply with quote

Yes, it seems so. When I started it, I did not envision it would grow this much...
_________________
shine on,

dr_strange

Set the Controls for the Heart of Gentoo
http://magenta.linuxforum.hu
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 2 of 6

 
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