From: Kito Date: Fri, 27 Jan 2006 19:44:26 +0000 (-0000) Subject: More path fixups, replace leading '/' for ld.so and .env functions. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=2a63fbab920a6950777983df8e413bf9407f1051;p=portage.git More path fixups, replace leading '/' for ld.so and .env functions. svn path=/main/branches/prefix/; revision=2596 --- diff --git a/pym/portage.py b/pym/portage.py index 187090ef4..629390d6f 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -575,8 +575,8 @@ def env_update(makelinks=1): 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=[] @@ -598,7 +598,7 @@ def env_update(makelinks=1): 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"]: @@ -608,9 +608,9 @@ def env_update(makelinks=1): # 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"); @@ -669,7 +669,7 @@ def env_update(makelinks=1): 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"] @@ -681,7 +681,7 @@ def env_update(makelinks=1): 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(): @@ -705,7 +705,7 @@ def env_update(makelinks=1): 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():