def env_update(makelinks=1):
global root
- if not os.path.exists(root+portage_const.PREFIX+"etc/env.d"):
+ if not os.path.exists(root+portage_const.PREFIX+"/etc/env.d"):
prevmask=os.umask(0)
- os.makedirs(root+portage_const.PREFIX+"etc/env.d",0755)
+ os.makedirs(root+portage_const.PREFIX+"/etc/env.d",0755)
os.umask(prevmask)
- fns=listdir(root+portage_const.PREFIX+"etc/env.d",EmptyOnError=1)
+ fns=listdir(root+portage_const.PREFIX+"/etc/env.d",EmptyOnError=1)
fns.sort()
pos=0
while (pos<len(fns)):
# don't process backup files
if x[-1]=='~' or x[-4:]==".bak":
continue
- myconfig=getconfig(root+portage_const.PREFIX+"etc/env.d/"+x)
+ myconfig=getconfig(root+portage_const.PREFIX+"/etc/env.d/"+x)
if myconfig==None:
writemsg("!!! Parsing error in "+str(root)+portage_const.PREFIX+"etc/env.d/"+str(x)+"\n")
#parse error
#ld.so.conf needs updating and ldconfig needs to be run
myfd=open(root+portage_const.PREFIX+"/etc/ld.so.conf","w")
myfd.write("# ld.so.conf autogenerated by env-update; make all changes to\n")
- myfd.write("# contents of "+portage_const.PREFIX+"etc/env.d directory\n")
+ myfd.write("# contents of "+portage_const.PREFIX+"/etc/env.d directory\n")
for x in specials["LDPATH"]:
myfd.write(x+"\n")
myfd.close()