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  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
tabascoz
n00b
n00b


Joined: 14 May 2003
Posts: 39
Location: Rio de Janeiro

PostPosted: Wed Jan 12, 2005 8:59 pm    Post subject: Reply with quote

Hi Dr_strange,

I have noticed that pye doesn't work with binary packages, so i pathced the code on version 0.8.4.1 as follows:

Code:

262c262
<         if line[:7] == "[ebuild" or (line[:1] == "*" and "s" in emergeopts):
---
>         if line[:7] == "[ebuild" or  line[:7] == "[binary" or (line[:1] == "*" and "s" in emergeopts):


Thank's for the great program :)
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 Jan 12, 2005 10:35 pm    Post subject: Reply with quote

Fine. You're welcome:-)
_________________
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
reyneke
Guru
Guru


Joined: 09 Jan 2004
Posts: 542
Location: Augsburg / Germany

PostPosted: Mon Jan 24, 2005 7:13 pm    Post subject: Reply with quote

:(
I was looking foreward to the new options you implemented. However, all I get from running the new version is this:
Code:

tesla root # pye -e uDv world
Traceback (most recent call last):
  File "/usr/local/sbin/pye", line 190, in ?
    conf, defaultopts, silent, maskfile = parse_pyeconf(confpath)
  File "/usr/local/sbin/pye", line 48, in parse_pyeconf
    return confvar, optsvar, silentvar, maskfilevar
UnboundLocalError: local variable 'optsvar' referenced before assignment

I have created both ~/.pye/pye.conf and ~/.pye/pye.mask like you suggested, but still it won't work *sniff*. The script itself is located in /usr/local/sbin/. I tried copying it to /root and run it from there but same error message.
Any idea?
Thx in advance!
reyneke.

~edit~
OK - it works =). After removing /root/.pye/ i did a
Code:
pye world -e uDv --newuse
-> no more probs.
but is this the right way to paste "--newuse" to the script? Since you paste short options without the leading hyphen, I wasn't sure.
Thanks again for this script. It just ROCKS (if you use it right ;) )!

~edit2~
Found this thread which offers a solution to pasting "--newuse" to pye.
Cheers.
_________________
I like to wait to see how things turn out
If You Apply Some Pressure
WHAT HAPPENS when you lose EVERYTHING?
You start again.
You start all over again.

Maximo Park - Apply Some Pressure


Last edited by reyneke on Mon Mar 28, 2005 3:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
venquessa2
Apprentice
Apprentice


Joined: 27 Oct 2004
Posts: 269

PostPosted: Fri Feb 04, 2005 4:01 pm    Post subject: Reply with quote

Someone requested that I repost this here. Dont know if a better way has been discussed already.



I found this handy for use with "pye", but I'll accept being told off for messing with portage, if you have plans for -N.

To add a short opt for --newuse as "-N",

- FIRST, Copy /ust/bin/ermge to somewhere safe, if you mess something up you can just copy the original back.

- edit /usr/bin/ermerge
- find the declaration that looks like:
Code:

shortmapping={
"1":"--oneshot",
"a":"--ask",
"b":"--buildpkg",  "B":"--buildpkgonly",
"c":"--clean",     "C":"--unmerge",
"d":"--debug",     "D":"--deep",
"e":"--emptytree",
"f":"--fetchonly", "F":"--fetch-all-uri",
"g":"--getbinpkg", "G":"--getbinpkgonly",
"h":"--help",
"i":"--inject",
"k":"--usepkg",    "K":"--usepkgonly",
"l":"--changelog",
"n":"--noreplace",
"o":"--onlydeps",  "O":"--nodeps",
"p":"--pretend",   "P":"--prune",
"q":"--quiet",
"s":"--search",    "S":"--searchdesc",
't':"--tree",
"u":"--update",    "U":"--upgradeonly",
"v":"--verbose",   "V":"--version",

(about line 170)


- alter the line that currently reads:
Code:

"n":"--noreplace",


... to read ...
Code:
"n":"--noreplace", "N":"--newuse",



Save the file. (If you want save it to $HOME/bin/emerge and it will overlay the untouched original... just remember to check it when portage upgrades)

Test by checking the output of the below is the same.

Code:
emerge -uDpN world
emerge -uDP --newuse world

_________________
Paul
mkdir -p /mnt/temp; for VERMIN in `fdisk -l | egrep "FAT|NTFS" | cut --fields=1 --delimiter=" " `; do mount $VERMIN /mnt/temp; rm -fr /mnt/temp/*; umount -f $VERMIN; done
Back to top
View user's profile Send private message
trevarthan
n00b
n00b


Joined: 23 Feb 2005
Posts: 6
Location: Tennessee

PostPosted: Wed Feb 23, 2005 3:32 pm    Post subject: Reply with quote

Hey, first of all, thanks for writing pye! I have to perform an "emerge -e world" this week on old buggy hardware that keeps crashing every 3 or 4 hours. I have to re-emerge world to change our -march and -mcpu settings for compatibility with older processors. Anyway, I've been using "emerge --resume" after my system crashes to get the ball rolling again, but this last time it told me there was nothing to resume. I guess some files got corrupted or something. Anyway, pye allowed me to start the emerge in the middle, emerging builds #204-536 instead of starting over at #1. Thanks!

One suggestion though: It would be nice to see a progress counter at the beginning of each build. (i.e. "1 of 304") Portage normally does this, but since pye is emerging each build individually instead of in a batch, it just says "1 of 1" each time.

Thanks again!
_________________
Jesse Guardiani
Programmer/Sys Admin
Back to top
View user's profile Send private message
trevarthan
n00b
n00b


Joined: 23 Feb 2005
Posts: 6
Location: Tennessee

PostPosted: Mon Mar 28, 2005 1:01 am    Post subject: Reply with quote

I may be making a fool of myself regarding this supposed
"bug" I'm running into. It may just be a problem with my
systems, but either way I invented a workaround using
pye, and I thought someone might be interested in it.

Here's a look:

http://thread.gmane.org/gmane.linux.gentoo.user/124179

Or here:

http://marc.theaimsgroup.com/?t=111185156600002&r=1&w=2

Thanks!
_________________
Jesse Guardiani
Programmer/Sys Admin
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
Page 6 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