Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

pye - "pick your emerge" script

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
133 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next
Author
Message
deepthought
Guru
Guru
User avatar
Posts: 321
Joined: Fri Apr 04, 2003 11:12 am
Location: icbm://5131''N:0710''E

  • Quote

Post by deepthought » Tue Feb 17, 2004 7:14 pm

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
Top
dr_strange
Guru
Guru
User avatar
Posts: 480
Joined: Tue Apr 16, 2002 7:19 pm
Location: Cambridge, UK

  • Quote

Post by dr_strange » Tue Feb 17, 2004 7:20 pm

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

dr_strange

Set the Controls for the Heart of Gentoo
http://magenta.linuxforum.hu
Top
dr_strange
Guru
Guru
User avatar
Posts: 480
Joined: Tue Apr 16, 2002 7:19 pm
Location: Cambridge, UK

  • Quote

Post by dr_strange » Tue Feb 17, 2004 8:56 pm

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
Top
revertex
l33t
l33t
User avatar
Posts: 806
Joined: Wed Apr 23, 2003 9:21 am

  • Quote

Post by revertex » Wed Feb 18, 2004 3:27 am

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: Select all

/usr/local/bin
the right place?
Top
singular
n00b
n00b
User avatar
Posts: 54
Joined: Sat Jun 07, 2003 3:34 am
Contact:
Contact singular
Website

  • Quote

Post by singular » Wed Feb 18, 2004 3:58 am

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.
Top
deepthought
Guru
Guru
User avatar
Posts: 321
Joined: Fri Apr 04, 2003 11:12 am
Location: icbm://5131''N:0710''E

  • Quote

Post by deepthought » Wed Feb 18, 2004 7:27 am

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
Top
scharkalvin
Guru
Guru
User avatar
Posts: 331
Joined: Sat Jan 31, 2004 1:36 am
Location: south florida

emerge error log?

  • Quote

Post by scharkalvin » Fri Feb 20, 2004 12:35 am

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.
Top
revertex
l33t
l33t
User avatar
Posts: 806
Joined: Wed Apr 23, 2003 9:21 am

Re: emerge error log?

  • Quote

Post by revertex » Fri Feb 20, 2004 2:33 am

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: Select all

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
Top
dr_strange
Guru
Guru
User avatar
Posts: 480
Joined: Tue Apr 16, 2002 7:19 pm
Location: Cambridge, UK

  • Quote

Post by dr_strange » Fri Feb 20, 2004 7:12 am

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
Top
CaribbeanKnight
Apprentice
Apprentice
User avatar
Posts: 240
Joined: Sun Apr 27, 2003 11:55 am
Location: Earth -> Europe -> Belgium -> Diest
Contact:
Contact CaribbeanKnight
Website

  • Quote

Post by CaribbeanKnight » Fri Feb 20, 2004 8:02 am

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..?
Top
dr_strange
Guru
Guru
User avatar
Posts: 480
Joined: Tue Apr 16, 2002 7:19 pm
Location: Cambridge, UK

  • Quote

Post by dr_strange » Fri Feb 20, 2004 10:31 am

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
Top
CaribbeanKnight
Apprentice
Apprentice
User avatar
Posts: 240
Joined: Sun Apr 27, 2003 11:55 am
Location: Earth -> Europe -> Belgium -> Diest
Contact:
Contact CaribbeanKnight
Website

  • Quote

Post by CaribbeanKnight » Sat Feb 21, 2004 4:34 am

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... :?
Top
dr_strange
Guru
Guru
User avatar
Posts: 480
Joined: Tue Apr 16, 2002 7:19 pm
Location: Cambridge, UK

  • Quote

Post by dr_strange » Sat Feb 21, 2004 2:43 pm

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
Top
deadaim
Guru
Guru
Posts: 467
Joined: Mon Oct 27, 2003 3:16 am
Location: Florida
Contact:
Contact deadaim
Website

  • Quote

Post by deadaim » Sat Feb 21, 2004 3:22 pm

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)
Top
dr_strange
Guru
Guru
User avatar
Posts: 480
Joined: Tue Apr 16, 2002 7:19 pm
Location: Cambridge, UK

  • Quote

Post by dr_strange » Wed Feb 25, 2004 10:37 pm

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
Top
wschlich
Retired Dev
Retired Dev
Posts: 41
Joined: Fri Sep 06, 2002 8:05 am
Location: Bonn, North Rhine-Westphalia, Germany, Old Europe
Contact:
Contact wschlich
Website

  • Quote

Post by wschlich » Wed Feb 25, 2004 10:44 pm

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/
Top
neenee
Veteran
Veteran
User avatar
Posts: 1786
Joined: Sun Jul 20, 2003 12:15 pm

  • Quote

Post by neenee » Wed Feb 25, 2004 10:47 pm

hm. i like it, but it's becoming a bit confusing;
especially the multiple help-outputs mentioned
in the script.
Top
Kristleifur
n00b
n00b
User avatar
Posts: 41
Joined: Sun Jan 04, 2004 5:30 pm
Location: Iceland

  • Quote

Post by Kristleifur » Wed Feb 25, 2004 10:48 pm

Very cool. I was looking this exact thing a while ago. Thanks.
Top
wschlich
Retired Dev
Retired Dev
Posts: 41
Joined: Fri Sep 06, 2002 8:05 am
Location: Bonn, North Rhine-Westphalia, Germany, Old Europe
Contact:
Contact wschlich
Website

  • Quote

Post by wschlich » Wed Feb 25, 2004 10:56 pm

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/
Top
christsong84
Veteran
Veteran
User avatar
Posts: 1003
Joined: Sun Apr 06, 2003 10:04 pm
Location: GMT-8 (Spokane)

  • Quote

Post by christsong84 » Wed Feb 25, 2004 11:03 pm

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: Select all

/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:
Top
dr_strange
Guru
Guru
User avatar
Posts: 480
Joined: Tue Apr 16, 2002 7:19 pm
Location: Cambridge, UK

  • Quote

Post by dr_strange » Wed Feb 25, 2004 11:32 pm

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
Top
dr_strange
Guru
Guru
User avatar
Posts: 480
Joined: Tue Apr 16, 2002 7:19 pm
Location: Cambridge, UK

  • Quote

Post by dr_strange » Wed Feb 25, 2004 11:34 pm

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
Top
wschlich
Retired Dev
Retired Dev
Posts: 41
Joined: Fri Sep 06, 2002 8:05 am
Location: Bonn, North Rhine-Westphalia, Germany, Old Europe
Contact:
Contact wschlich
Website

  • Quote

Post by wschlich » Thu Feb 26, 2004 7:56 am

works :) thanks.
Wolfram Schlich <wschlich@gentoo.org>
https://github.com/wschlich/ * http://dev.gentoo.org/~wschlich/ * http://wolfram.schlich.org/
Top
wschlich
Retired Dev
Retired Dev
Posts: 41
Joined: Fri Sep 06, 2002 8:05 am
Location: Bonn, North Rhine-Westphalia, Germany, Old Europe
Contact:
Contact wschlich
Website

  • Quote

Post by wschlich » Thu Feb 26, 2004 7:57 am

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/
Top
dr_strange
Guru
Guru
User avatar
Posts: 480
Joined: Tue Apr 16, 2002 7:19 pm
Location: Cambridge, UK

  • Quote

Post by dr_strange » Thu Feb 26, 2004 8:11 am

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
Top
Post Reply

133 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy