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

svn path=/main/branches/2.1.2/; revision=10666

bin/emerge

index 78f792428606cac336a54a7e76adbe729d46806f..6921b7d1daa1bbd8f784cc20ca86a0b2ecee01f0 100755 (executable)
@@ -6917,13 +6917,15 @@ def post_emerge(settings, 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)