Make some post_merge() things conditional on the vdb lock being held
authorZac Medico <zmedico@gentoo.org>
Mon, 16 Jun 2008 08:32:54 +0000 (08:32 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 16 Jun 2008 08:32:54 +0000 (08:32 -0000)
(mtimedb commit and info dirs processing).

svn path=/main/trunk/; revision=10659

pym/_emerge/__init__.py

index 208635a0285eae12cd80a05cdfeadd4ddb75b9a7..bc34faf77656ca07ac6505acdf99ddf50722432b 100644 (file)
@@ -6933,13 +6933,16 @@ def post_emerge(trees, mtimedb, retval):
        vdb_lock = None
        if os.access(vdb_path, os.W_OK):
                vdb_lock = portage.locks.lockdir(vdb_path)
-       try:
-               if "noinfo" not in settings.features:
-                       chk_updated_info_files(target_root, infodirs, info_mtimes, retval)
-               mtimedb.commit()
-       finally:
-               if vdb_lock:
-                       portage.locks.unlockdir(vdb_lock)
+
+       if vdb_lock:
+               try:
+                       if "noinfo" not in settings.features:
+                               chk_updated_info_files(target_root,
+                                       infodirs, info_mtimes, retval)
+                       mtimedb.commit()
+               finally:
+                       if vdb_lock:
+                               portage.locks.unlockdir(vdb_lock)
 
        chk_updated_cfg_files(target_root, config_protect)