Don't bother to lock CONFIG_MEMORY_FILE since writedict is atomic anyway.
authorZac Medico <zmedico@gentoo.org>
Sun, 20 Aug 2006 07:47:20 +0000 (07:47 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 20 Aug 2006 07:47:20 +0000 (07:47 -0000)
svn path=/main/trunk/; revision=4313

pym/portage.py

index 15bf668202d757d33b888ab4049adb1f270a3df9..c466b72289dc27ebc45dd9c10f93b8529dff204d 100644 (file)
@@ -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,