summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-03-05 19:57:30 +0000
committerZac Medico <zmedico@gentoo.org>2006-03-05 19:57:30 +0000
commit045b51e2bf5bda93b3eef9e8ae0fcba66be680af (patch)
treed0c8f12106370d42f88e3d3bb74fc0d0f2b21ecf
parent62705448fcd0b6b9ef793372dce2ceda0c3a3eb2 (diff)
downloadportage-045b51e2bf5bda93b3eef9e8ae0fcba66be680af.tar.gz
portage-045b51e2bf5bda93b3eef9e8ae0fcba66be680af.tar.bz2
portage-045b51e2bf5bda93b3eef9e8ae0fcba66be680af.zip
Remove the leading / from CONFIG_MEMORY_FILE for better cooperation with os.path.join (see bug #124471).
svn path=/main/trunk/; revision=2816
-rw-r--r--pym/portage.py9
-rw-r--r--pym/portage_const.py2
2 files changed, 4 insertions, 7 deletions
diff --git a/pym/portage.py b/pym/portage.py
index e68a6d048..850800f89 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5984,10 +5984,7 @@ class dblink:
self.updateprotect()
#if we have a file containing previously-merged config file md5sums, grab it.
- if os.path.exists(destroot+CONFIG_MEMORY_FILE):
- cfgfiledict=grabdict(destroot+CONFIG_MEMORY_FILE)
- else:
- cfgfiledict={}
+ cfgfiledict = grabdict(os.path.join(destroot, CONFIG_MEMORY_FILE))
if self.settings.has_key("NOCONFMEM"):
cfgfiledict["IGNORE"]=1
else:
@@ -6055,8 +6052,8 @@ class dblink:
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)
+ mylock = portage_locks.lockfile(os.path.join(destroot, CONFIG_MEMORY_FILE))
+ writedict(cfgfiledict, os.path.join(destroot, CONFIG_MEMORY_FILE))
portage_locks.unlockfile(mylock)
#do postinst script
diff --git a/pym/portage_const.py b/pym/portage_const.py
index 1b5459f45..c3c768620 100644
--- a/pym/portage_const.py
+++ b/pym/portage_const.py
@@ -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"]