in portage.py, do_vartree(), it reads if virts: myvkeys=virts.keys() for x in myvkeys: vkeysplit=x.split("/") if not virts_p.has_key(vkeysplit[1]): virts_p[vkeysplit[1]]=virts[x] del x note the missing indent of 'del x', for me this renders this error message when trying a emerge sync: ---- indy:~# emerge sync >>> Note: /etc/make.profile isn't available; an 'emerge sync' will probably fix this. Traceback (most recent call last): File "/usr/bin/emerge", line 6, in ? import os,sys,portage,xpak,string,re,commands,time,threading,shutil,traceback File "/usr/lib/python2.2/site-packages/portage.py", line 4154, in ? do_vartree() File "/usr/lib/python2.2/site-packages/portage.py", line 4147, in do_vartree del x UnboundLocalError: local variable 'x' referenced before assignment indy:~# ---
What stage file are you using? Where did you get it? What version of portage? 'emerge info'
This occured while attempting to get portage working on a debian system while trying to start up a mips-port of gentoo,hence the 'minor' severity - no less a bug :) it exists in 2.0.44 and above at least, probably more versions too :) x is not defined if "if virts:" doesen't happen (no virts?, not that I have a clue wtf. this func actually does) just add a tab and it'll be fine!
latest portage.py has this: if virts: myvkeys=virts.keys() for x in myvkeys: vkeysplit=x.split("/") if not virts_p.has_key(vkeysplit[1]): virts_p[vkeysplit[1]]=virts[x] try: del x