From: Fabian Groffen Date: Sat, 14 Oct 2006 20:48:55 +0000 (-0000) Subject: Add a bunch of prefixes that were lost after merging. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=6ce81373488d927c87889ef41e5c9f26f91f2385;p=portage.git Add a bunch of prefixes that were lost after merging. svn path=/main/branches/prefix/; revision=4696 --- diff --git a/cnf/make.conf b/cnf/make.conf index 39b58d3ce..b0c7d147f 100644 --- a/cnf/make.conf +++ b/cnf/make.conf @@ -77,12 +77,12 @@ # PORTAGE_TMPDIR is the location portage will use for compilations and # temporary storage of data. This can get VERY large depending upon # the application being installed. -#PORTAGE_TMPDIR="${EPREFIX}"/var/tmp +#PORTAGE_TMPDIR=${EPREFIX}/var/tmp # # PORTDIR is the location of the portage tree. This is the repository # for all profile information as well as all ebuilds. If you change # this, you must update your /etc/make.profile symlink accordingly. -#PORTDIR="${EPREFIX}"/usr/portage +#PORTDIR=${EPREFIX}/usr/portage # # DISTDIR is where all of the source code tarballs will be placed for # emerges. The source code is maintained here unless you delete diff --git a/pym/portage.py b/pym/portage.py index 062fe903f..4d0498ea2 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -543,7 +543,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None): if prev_mtimes is None: global mtimedb prev_mtimes = mtimedb["ldpath"] - envd_dir = os.path.join(target_root, "etc", "env.d") + envd_dir = os.path.join(target_root, portage_const.EPREFIX, "etc", "env.d") portage_util.ensure_dirs(envd_dir, mode=0755) fns = listdir(envd_dir, EmptyOnError=1) fns.sort() @@ -614,7 +614,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None): they won't be overwritten by this dict.update call.""" env.update(myconfig) - ldsoconf_path = os.path.join(target_root, "etc", "ld.so.conf") + ldsoconf_path = os.path.join(target_root, portage_const.EPREFIX, "etc", "ld.so.conf") try: myld = open(ldsoconf_path) myldlines=myld.readlines() @@ -646,7 +646,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None): # Update prelink.conf if we are prelink-enabled if prelink_capable: newprelink = atomic_ofstream( - os.path.join(target_root, "etc", "prelink.conf")) + os.path.join(target_root, portage_const.EPREFIX, "etc", "prelink.conf")) newprelink.write("# prelink.conf autogenerated by env-update; make all changes to\n") newprelink.write("# contents of "+portage_const.EPREFIX+"/etc/env.d directory\n") @@ -675,7 +675,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None): mtime_changed = False lib_dirs = set() for lib_dir in portage_util.unique_array(specials["LDPATH"]+['usr/lib','usr/lib64','usr/lib32','lib','lib64','lib32']): - x = os.path.join(target_root, lib_dir.lstrip(os.sep)) + x = os.path.join(target_root, portage_const.EPREFIX, lib_dir.lstrip(os.sep)) try: newldpathtime = os.stat(x)[stat.ST_MTIME] lib_dirs.add(normalize_path(x)) @@ -723,16 +723,18 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None): # an older package installed ON TOP of a newer version will cause ldconfig # to overwrite the symlinks we just made. -X means no links. After 'clean' # we can safely create links. - writemsg(">>> Regenerating %setc/ld.so.cache...\n" % target_root) + writemsg(">>> Regenerating %setc/ld.so.cache...\n" % + target_root+portage_const.EPREFIX) if makelinks: - commands.getstatusoutput("cd / ; /sbin/ldconfig -r '%s'" % target_root) + commands.getstatusoutput("cd / ; "+portage_const.EPREFIX+"/sbin/ldconfig -r '%s'" % target_root) else: - commands.getstatusoutput("cd / ; /sbin/ldconfig -X -r '%s'" % target_root) + commands.getstatusoutput("cd / ; "+portage_const.EPREFIX+"/sbin/ldconfig -X -r '%s'" % target_root) elif ostype in ("FreeBSD","DragonFly"): - writemsg(">>> Regenerating %svar/run/ld-elf.so.hints...\n" % target_root) + writemsg(">>> Regenerating %svar/run/ld-elf.so.hints...\n" % + target_root+portage_const.EPREFIX) commands.getstatusoutput( - "cd / ; /sbin/ldconfig -elf -i -f '%svar/run/ld-elf.so.hints' '%setc/ld.so.conf'" % \ - (target_root, target_root)) + "cd / ; "+portage_const.EPREFIX+"/sbin/ldconfig -elf -i -f '%svar/run/ld-elf.so.hints' '%setc/ld.so.conf'" % \ + (target_root+portage_const.EPREFIX, target_root+portage_const.EPREFIX)) del specials["LDPATH"] @@ -743,7 +745,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None): cenvnotice += "# GO INTO "+portage_const.EPREFIX+"/etc/csh.cshrc NOT "+portage_const.EPREFIX+"/etc/csh.env\n\n" #create /etc/profile.env for bash support - outfile = atomic_ofstream(os.path.join(target_root, "etc", "profile.env")) + outfile = atomic_ofstream(os.path.join(target_root, portage_const.EPREFIX, "etc", "profile.env")) outfile.write(penvnotice) env_keys = [ x for x in env if x != "LDPATH" ] @@ -753,7 +755,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None): outfile.close() #create /etc/csh.env for (t)csh support - outfile = atomic_ofstream(os.path.join(target_root, "etc", "csh.env")) + outfile = atomic_ofstream(os.path.join(target_root, portage_const.EPREFIX, "etc", "csh.env")) outfile.write(cenvnotice) for x in env_keys: outfile.write("setenv %s '%s'\n" % (x, env[x])) @@ -1367,7 +1369,7 @@ class config: def _init_dirs(self): """Create tmp, var/tmp and var/lib/portage (relative to $ROOT).""" - if not os.access(self["ROOT"], os.W_OK): + if not os.access(self["ROOT"] + os.sep + portage_const.EPREFIX, os.W_OK): return dir_mode_map = { @@ -2647,7 +2649,8 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m mysettings["HOME"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "homedir") mysettings["WORKDIR"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "work") - mysettings["D"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image") + os.sep + mysettings["EDEST"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image") + os.sep + mysettings["D"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image", mysettings["EPREFIX"]) + os.sep mysettings["T"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "temp") mysettings["PORTAGE_BASHRC"] = os.path.join( @@ -5721,7 +5724,8 @@ class dblink: raise ValueError self.myroot=myroot - protect_obj = portage_util.ConfigProtect(myroot, + protect_obj = portage_util.ConfigProtect(myroot + + os.path.sep + portage_const.EPREFIX, mysettings.get("CONFIG_PROTECT","").split(), mysettings.get("CONFIG_PROTECT_MASK","").split()) self.updateprotect = protect_obj.updateprotect @@ -6327,7 +6331,7 @@ class dblink: def mergeme(self,srcroot,destroot,outfile,secondhand,stufftomerge,cfgfiledict,thismtime): from os.path import sep, join - prefix = normqlize_path(portage_const.EPREFIX) + prefix = normalize_path(portage_const.EPREFIX) # grobian: is this sane/still necessart? #if srcroot.endswith(prefix): # # Trim prefix from srcroot