Index: sys-apps/portage/files/portage-2.1.9.45-fastbuild.patch |
diff --git a/sys-apps/portage/files/portage-2.1.9.45-fastbuild.patch b/sys-apps/portage/files/portage-2.1.9.45-fastbuild.patch |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2936ad4fe8ca49146e9945782b4dd2ccffb70b3f |
--- /dev/null |
+++ b/sys-apps/portage/files/portage-2.1.9.45-fastbuild.patch |
@@ -0,0 +1,46 @@ |
+commit 89e9b53262f714aa8f8ce9128a95919935808b41 |
+Author: David James <davidjames@google.com> |
+Date: Wed Jan 26 11:43:11 2011 -0800 |
+ |
+ Commit fast-build patch to portage_tool repository. |
+ |
+ This patch allows us to selectively disable Portage locks in parallel_emerge. |
+ It is not intended to be upstreamed but is left in for now until we find a way |
+ to replace it (e.g. by integrating parallel emerge support directly into portage |
+ itself). |
+ |
+ Change-Id: I4ea50e206102b249ba01d2f760ebaba221bddd18 |
+ |
+ BUG=chromium-os:11324 |
+ TEST=build_packages --nousepkg |
+ |
+ Review URL: http://codereview.chromium.org/6377009 |
+ |
+diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py |
+index f169e39..7856c85 100644 |
+--- a/pym/portage/dbapi/vartree.py |
++++ b/pym/portage/dbapi/vartree.py |
+@@ -1289,14 +1289,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: |