View previous topic :: View next topic |
Author |
Message |
deepthought Guru
Joined: 04 Apr 2003 Posts: 321 Location: icbm://5131''N:0710''E
|
Posted: Tue Feb 17, 2004 7:14 pm Post subject: |
|
|
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 |
|
|
dr_strange Guru
Joined: 16 Apr 2002 Posts: 480 Location: Cambridge, UK
|
Posted: Tue Feb 17, 2004 7:20 pm Post subject: |
|
|
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 |
|
|
dr_strange Guru
Joined: 16 Apr 2002 Posts: 480 Location: Cambridge, UK
|
Posted: Tue Feb 17, 2004 8:56 pm Post subject: |
|
|
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... _________________ shine on,
dr_strange
Set the Controls for the Heart of Gentoo
http://magenta.linuxforum.hu |
|
Back to top |
|
|
revertex l33t
Joined: 23 Apr 2003 Posts: 806
|
Posted: Wed Feb 18, 2004 3:27 am Post subject: |
|
|
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
the right place? |
|
Back to top |
|
|
singular n00b
Joined: 07 Jun 2003 Posts: 54
|
Posted: Wed Feb 18, 2004 3:58 am Post subject: |
|
|
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 |
|
|
deepthought Guru
Joined: 04 Apr 2003 Posts: 321 Location: icbm://5131''N:0710''E
|
Posted: Wed Feb 18, 2004 7:27 am Post subject: |
|
|
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 |
|
|
scharkalvin Guru
Joined: 31 Jan 2004 Posts: 331 Location: south florida
|
Posted: Fri Feb 20, 2004 12:35 am Post subject: emerge error log? |
|
|
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 |
|
|
revertex l33t
Joined: 23 Apr 2003 Posts: 806
|
Posted: Fri Feb 20, 2004 2:33 am Post subject: Re: emerge error log? |
|
|
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 |
|
|
dr_strange Guru
Joined: 16 Apr 2002 Posts: 480 Location: Cambridge, UK
|
Posted: Fri Feb 20, 2004 7:12 am Post subject: |
|
|
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 |
|
|
CaribbeanKnight Apprentice
Joined: 27 Apr 2003 Posts: 240 Location: Earth -> Europe -> Belgium -> Diest
|
Posted: Fri Feb 20, 2004 8:02 am Post subject: |
|
|
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 |
|
|
dr_strange Guru
Joined: 16 Apr 2002 Posts: 480 Location: Cambridge, UK
|
Posted: Fri Feb 20, 2004 10:31 am Post subject: |
|
|
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 |
|
|
CaribbeanKnight Apprentice
Joined: 27 Apr 2003 Posts: 240 Location: Earth -> Europe -> Belgium -> Diest
|
Posted: Sat Feb 21, 2004 4:34 am Post subject: |
|
|
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 |
|
|
dr_strange Guru
Joined: 16 Apr 2002 Posts: 480 Location: Cambridge, UK
|
Posted: Sat Feb 21, 2004 2:43 pm Post subject: |
|
|
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 |
|
|
deadaim Guru
Joined: 27 Oct 2003 Posts: 467 Location: Florida
|
Posted: Sat Feb 21, 2004 3:22 pm Post subject: |
|
|
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! |
|
Back to top |
|
|
dr_strange Guru
Joined: 16 Apr 2002 Posts: 480 Location: Cambridge, UK
|
Posted: Wed Feb 25, 2004 10:37 pm Post subject: |
|
|
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 |
|
|
wschlich Retired Dev
Joined: 06 Sep 2002 Posts: 41 Location: Bonn, North Rhine-Westphalia, Germany, Old Europe
|
Posted: Wed Feb 25, 2004 10:44 pm Post subject: |
|
|
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 |
|
|
neenee Veteran
Joined: 20 Jul 2003 Posts: 1786
|
Posted: Wed Feb 25, 2004 10:47 pm Post subject: |
|
|
hm. i like it, but it's becoming a bit confusing;
especially the multiple help-outputs mentioned
in the script. |
|
Back to top |
|
|
Kristleifur n00b
Joined: 04 Jan 2004 Posts: 41 Location: Iceland
|
Posted: Wed Feb 25, 2004 10:48 pm Post subject: |
|
|
Very cool. I was looking this exact thing a while ago. Thanks. |
|
Back to top |
|
|
wschlich Retired Dev
Joined: 06 Sep 2002 Posts: 41 Location: Bonn, North Rhine-Westphalia, Germany, Old Europe
|
Posted: Wed Feb 25, 2004 10:56 pm Post subject: |
|
|
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 |
|
|
christsong84 Veteran
Joined: 06 Apr 2003 Posts: 1003 Location: GMT-8 (Spokane)
|
Posted: Wed Feb 25, 2004 11:03 pm Post subject: |
|
|
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
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);} |
|
Back to top |
|
|
dr_strange Guru
Joined: 16 Apr 2002 Posts: 480 Location: Cambridge, UK
|
Posted: Wed Feb 25, 2004 11:32 pm Post subject: |
|
|
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 |
|
|
dr_strange Guru
Joined: 16 Apr 2002 Posts: 480 Location: Cambridge, UK
|
Posted: Wed Feb 25, 2004 11:34 pm Post subject: |
|
|
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 |
|
|
wschlich Retired Dev
Joined: 06 Sep 2002 Posts: 41 Location: Bonn, North Rhine-Westphalia, Germany, Old Europe
|
|
Back to top |
|
|
wschlich Retired Dev
Joined: 06 Sep 2002 Posts: 41 Location: Bonn, North Rhine-Westphalia, Germany, Old Europe
|
|
Back to top |
|
|
dr_strange Guru
Joined: 16 Apr 2002 Posts: 480 Location: Cambridge, UK
|
Posted: Thu Feb 26, 2004 8:11 am Post subject: |
|
|
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 |
|
|
|