for myenv in myconfig.keys():
env[myenv]=myconfig[myenv]
- if os.path.exists(root+portage_const.PREFIX+"etc/ld.so.conf"):
- myld=open(root+portage_const.PREFIX+"etc/ld.so.conf")
+ if os.path.exists(root+portage_const.PREFIX+"/etc/ld.so.conf"):
+ myld=open(root+portage_const.PREFIX+"/etc/ld.so.conf")
myldlines=myld.readlines()
myld.close()
oldld=[]
newld=specials["LDPATH"]
if (oldld!=newld):
#ld.so.conf needs updating and ldconfig needs to be run
- myfd=open(root+portage_const.PREFIX+"etc/ld.so.conf","w")
+ 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")
for x in specials["LDPATH"]:
# Update prelink.conf if we are prelink-enabled
if prelink_capable:
- newprelink=open(root+portage_const.PREFIX+"etc/prelink.conf","w")
+ newprelink=open(root+portage_const.PREFIX+"/etc/prelink.conf","w")
newprelink.write("# prelink.conf autogenerated by env-update; make all changes to\n")
- newprelink.write("# contents of "+portage_const.PREFIX+"etc/env.d directory\n")
+ newprelink.write("# contents of "+portage_const.PREFIX+"/etc/env.d directory\n")
for x in map(lambda x: portage_const.PREFIX+x, ["bin","/sbin","/usr/bin","/usr/sbin","/lib","/usr/lib"]):
newprelink.write("-l "+x+"\n");
elif ostype in ("FreeBSD","DragonFly"):
if (ld_cache_update):
writemsg(">>> Regenerating "+str(root)+"var/run/ld-elf.so.hints...\n")
- commands.getstatusoutput("cd / ; "+portage_const.PREFIX+"/sbin/ldconfig -elf -i -f "+str(root)+portage_const.PREFIX+"var/run/ld-elf.so.hints "+str(root)+portage_const.PREFIX+"etc/ld.so.conf")
+ commands.getstatusoutput("cd / ; "+portage_const.PREFIX+"/sbin/ldconfig -elf -i -f "+str(root)+portage_const.PREFIX+"/var/run/ld-elf.so.hints "+str(root)+portage_const.PREFIX+"/etc/ld.so.conf")
commands.getstatusoutput("cd / ; /sbin/ldconfig -elf -i -f "+str(root)+"var/run/ld-elf.so.hints "+str(root)+"etc/ld.so.conf")
del specials["LDPATH"]
cenvnotice += "# GO INTO /etc/csh.cshrc NOT /etc/csh.env\n\n"
#create /etc/profile.env for bash support
- outfile=open(root+portage_const.PREFIX+"etc/profile.env","w")
+ outfile=open(root+portage_const.PREFIX+"/etc/profile.env","w")
outfile.write(penvnotice)
for path in specials.keys():
outfile.close()
#create /etc/csh.env for (t)csh support
- outfile=open(root+portage_const.PREFIX+"etc/csh.env","w")
+ outfile=open(root+portage_const.PREFIX+"/etc/csh.env","w")
outfile.write(cenvnotice)
for path in specials.keys():