Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: pym/portage/dbapi/vartree.py

Issue 6377009: Commit fast-build patch to portage_tool repository. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/portage_tool.git@cros-2.1.9
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pym/portage/dbapi/vartree.py
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 965f154901c19294538f86e3ccb075e430331cde..a62971aaab725a8a7cef7617c384f2af87327e28 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1295,14 +1295,15 @@ class dblink(object):
raise AssertionError("Lock already held.")
# At least the parent needs to exist for the lock file.
ensure_dirs(self.dbroot)
- if self._scheduler is None:
- self._lock_vdb = lockdir(self.dbroot)
- else:
- async_lock = AsynchronousLock(path=self.dbroot,
- scheduler=self._scheduler)
- async_lock.start()
- async_lock.wait()
- self._lock_vdb = async_lock
+ if os.environ.get("PORTAGE_LOCKS") != "false":
+ if self._scheduler is None:
+ self._lock_vdb = lockdir(self.dbroot)
+ else:
+ async_lock = AsynchronousLock(path=self.dbroot,
+ scheduler=self._scheduler)
+ async_lock.start()
+ async_lock.wait()
+ self._lock_vdb = async_lock
def unlockdb(self):
if self._lock_vdb is not None:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698