summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-08-20 07:47:20 +0000
committerZac Medico <zmedico@gentoo.org>2006-08-20 07:47:20 +0000
commit50ad5109b9091e065f483118b24e94a40c8f8d74 (patch)
treeb3874972c671ef00221fbae99826fa056f769185
parent14175e69ce042e263b321ea30394550590dbcb70 (diff)
downloadportage-50ad5109b9091e065f483118b24e94a40c8f8d74.tar.gz
portage-50ad5109b9091e065f483118b24e94a40c8f8d74.tar.bz2
portage-50ad5109b9091e065f483118b24e94a40c8f8d74.zip
Don't bother to lock CONFIG_MEMORY_FILE since writedict is atomic anyway.
svn path=/main/trunk/; revision=4313
-rw-r--r--pym/portage.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 15bf66820..c466b7228 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5990,7 +5990,8 @@ class dblink:
self.updateprotect()
#if we have a file containing previously-merged config file md5sums, grab it.
- cfgfiledict = grabdict(os.path.join(destroot, CONFIG_MEMORY_FILE))
+ conf_mem_file = os.path.join(destroot, CONFIG_MEMORY_FILE)
+ cfgfiledict = grabdict(conf_mem_file)
if self.settings.has_key("NOCONFMEM"):
cfgfiledict["IGNORE"]=1
else:
@@ -6059,10 +6060,8 @@ class dblink:
os.chown(my_private_path, os.getuid(), portage_gid)
os.chmod(my_private_path, 02770)
- mylock = portage_locks.lockfile(
- os.path.join(destroot, CONFIG_MEMORY_FILE), wantnewlockfile=1)
- writedict(cfgfiledict, os.path.join(destroot, CONFIG_MEMORY_FILE))
- portage_locks.unlockfile(mylock)
+ writedict(cfgfiledict, conf_mem_file)
+ del conf_mem_file
#do postinst script
a = doebuild(myebuild, "postinst", destroot, self.settings, use_cache=0,