summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-09-27 17:54:34 +0000
committerZac Medico <zmedico@gentoo.org>2007-09-27 17:54:34 +0000
commit96506ec5eeb9a747625e89c4f804370c6dedce2b (patch)
treee309c4046f1e6f07bce1bcb812efda2ba08713cc
parente7d80bcda4f526e526d441cb8f4a9064453b180b (diff)
downloadportage-96506ec5eeb9a747625e89c4f804370c6dedce2b.tar.gz
portage-96506ec5eeb9a747625e89c4f804370c6dedce2b.tar.bz2
portage-96506ec5eeb9a747625e89c4f804370c6dedce2b.zip
Bug #194025 - Lock /var/db/pkg in post_merge() during the
"Regenerating GNU info directory index" routine. svn path=/main/trunk/; revision=7853
-rw-r--r--pym/emerge/__init__.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 840a750e3..87ef8ad1b 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -4502,8 +4502,15 @@ def post_emerge(trees, mtimedb, retval):
else:
mod_echo.finalize()
- if "noinfo" not in settings.features:
- chk_updated_info_files(target_root, infodirs, info_mtimes, retval)
+ vdb_path = os.path.join(target_root, portage.VDB_PATH)
+ portage.util.ensure_dirs(vdb_path)
+ 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:
+ portage.locks.unlockdir(vdb_lock)
chk_updated_cfg_files(target_root, config_protect)
@@ -4518,8 +4525,7 @@ def post_emerge(trees, mtimedb, retval):
print colorize("WARN", " * ") + " - %s" % f
print "Use " + colorize("GOOD", "revdep-rebuild") + " to rebuild packages using these libraries"
print "and then remerge the packages listed above."
-
- mtimedb.commit()
+
sys.exit(retval)