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

Issue 6377009: Commit fast-build patch to portage_tool repository. (Closed)

Created:
9 years, 11 months ago by davidjames
Modified:
9 years, 4 months ago
Reviewers:
anush
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

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 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=bac8142

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -8 lines) Patch
M pym/portage/dbapi/vartree.py View 1 chunk +9 lines, -8 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
davidjames
9 years, 11 months ago (2011-01-26 01:27:28 UTC) #1
anush
9 years, 11 months ago (2011-01-26 03:58:28 UTC) #2
Lgtm
On Jan 25, 2011 5:27 PM, <davidjames@chromium.org> wrote:
> Reviewers: anush,
>
> Description:
> 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=None
> TEST=build_packages --nousepkg
>
> Please review this at http://codereview.chromium.org/6377009/
>
> SVN Base: ssh://git@gitrw.chromium.org:9222/portage_tool.git@cros-2.1.9
>
> Affected files:
> M pym/portage/dbapi/vartree.py
>
>
> 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:
>
>

Powered by Google App Engine
This is Rietveld 408576698