Remove the leading / from PRIVATE_PATH (var/lib/portage) for better cooperation with...
authorZac Medico <zmedico@gentoo.org>
Sun, 5 Mar 2006 19:45:23 +0000 (19:45 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 5 Mar 2006 19:45:23 +0000 (19:45 -0000)
svn path=/main/trunk/; revision=2815

pym/portage.py
pym/portage_checksum.py
pym/portage_const.py

index 10c793f2704ca9ecfbafd74c374ed5d285ceaa39..e68a6d0485937424521aa4e289741ff59e2a7715 100644 (file)
@@ -6049,11 +6049,11 @@ class dblink:
                if cfgfiledict.has_key("IGNORE"):
                        del cfgfiledict["IGNORE"]
 
-               # XXXX: HACK! PathSpec is very necessary here.
-               if not os.path.exists(destroot+PRIVATE_PATH):
-                       os.makedirs(destroot+PRIVATE_PATH)
-                       os.chown(destroot+PRIVATE_PATH,os.getuid(),portage_gid)
-                       os.chmod(destroot+PRIVATE_PATH,02770)
+               my_private_path = os.path.join(destroot, PRIVATE_PATH)
+               if not os.path.exists(my_private_path):
+                       os.makedirs(my_private_path)
+                       os.chown(my_private_path, os.getuid(), portage_gid)
+                       os.chmod(my_private_path, 02770)
 
                mylock = portage_locks.lockfile(destroot+CONFIG_MEMORY_FILE)
                writedict(cfgfiledict,destroot+CONFIG_MEMORY_FILE)
index 2dd447df20f6b049c7fcf60843f49031280d00e1..8196628ca4c855fc0309ee8dd679425d4231576e 100644 (file)
@@ -120,7 +120,7 @@ def pyhash(filename, hashobject):
 
 def perform_checksum(filename, hash_function=md5hash, calc_prelink=0):
        myfilename      = filename[:]
-       prelink_tmpfile = PRIVATE_PATH+"/prelink-checksum.tmp."+str(os.getpid())
+       prelink_tmpfile = os.path.join("/", PRIVATE_PATH, "prelink-checksum.tmp." + str(os.getpid()))
        mylock          = None
        
        if calc_prelink and prelink_capable:
index 2a36c82f9bd4537079fca30e2e117e7ef1a8358c..1b5459f455fef876eab258c83f52de437790439b 100644 (file)
@@ -9,7 +9,7 @@
 # ===========================================================================
 
 VDB_PATH                = "var/db/pkg"
-PRIVATE_PATH            = "/var/lib/portage"
+PRIVATE_PATH            = "var/lib/portage"
 CACHE_PATH              = "/var/cache/edb"
 DEPCACHE_PATH           = CACHE_PATH+"/dep"
 
@@ -29,7 +29,7 @@ BASH_BINARY             = "/bin/bash"
 MOVE_BINARY             = "/bin/mv"
 PRELINK_BINARY          = "/usr/sbin/prelink"
 
-WORLD_FILE              = PRIVATE_PATH+"/world"
+WORLD_FILE              = "/" + PRIVATE_PATH + "/world"
 MAKE_CONF_FILE          = "/etc/make.conf"
 MAKE_DEFAULTS_FILE      = PROFILE_PATH + "/make.defaults"
 DEPRECATED_PROFILE_FILE = PROFILE_PATH+"/deprecated"
@@ -37,7 +37,7 @@ USER_VIRTUALS_FILE      = USER_CONFIG_PATH+"/virtuals"
 EBUILD_SH_ENV_FILE      = USER_CONFIG_PATH+"/bashrc"
 INVALID_ENV_FILE        = "/etc/spork/is/not/valid/profile.env"
 CUSTOM_MIRRORS_FILE     = USER_CONFIG_PATH+"/mirrors"
-CONFIG_MEMORY_FILE      = PRIVATE_PATH + "/config"
+CONFIG_MEMORY_FILE      = "/" + PRIVATE_PATH + "/config"
 
 INCREMENTALS=["USE","USE_EXPAND","USE_EXPAND_HIDDEN","FEATURES","ACCEPT_KEYWORDS","ACCEPT_LICENSE","CONFIG_PROTECT_MASK","CONFIG_PROTECT","PRELINK_PATH","PRELINK_PATH_MASK"]
 STICKIES=["KEYWORDS_ACCEPT","USE","CFLAGS","CXXFLAGS","MAKEOPTS","EXTRA_ECONF","EXTRA_EINSTALL","EXTRA_EMAKE"]