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

Unified Diff: pym/_emerge/BlockerDB.py

Issue 6688037: Update Portage to sync BlockerDB at init, rather than before every package. (Closed) Base URL: http://git.chromium.org/git/portage_tool.git@cros-2.1.9
Patch Set: Address review feedback. Created 9 years, 9 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 | pym/_emerge/FakeVartree.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pym/_emerge/BlockerDB.py
diff --git a/pym/_emerge/BlockerDB.py b/pym/_emerge/BlockerDB.py
index fd4bf5ecebe149821c301234904b2971461dfc8d..f5adc4d6728999854dda44ea99787d45b2627bd6 100644
--- a/pym/_emerge/BlockerDB.py
+++ b/pym/_emerge/BlockerDB.py
@@ -30,12 +30,7 @@ class BlockerDB(object):
"vartree" : fake_vartree,
}}
- def _get_fake_vartree(self, acquire_lock=0):
- fake_vartree = self._fake_vartree
- fake_vartree.sync(acquire_lock=acquire_lock)
- return fake_vartree
-
- def findInstalledBlockers(self, new_pkg, acquire_lock=0):
+ def findInstalledBlockers(self, new_pkg):
"""
Search for installed run-time blockers in the root where
new_pkg is planned to be installed. This ignores build-time
@@ -45,7 +40,7 @@ class BlockerDB(object):
dep_keys = ["RDEPEND", "PDEPEND"]
settings = self._vartree.settings
stale_cache = set(blocker_cache)
- fake_vartree = self._get_fake_vartree(acquire_lock=acquire_lock)
+ fake_vartree = self._fake_vartree
dep_check_trees = self._dep_check_trees
vardb = fake_vartree.dbapi
installed_pkgs = list(vardb)
@@ -118,3 +113,7 @@ class BlockerDB(object):
return blocking_pkgs
+ def discardBlocker(self, pkg):
+ """Discard a package from the list of potential blockers."""
+ self._fake_vartree.cpv_discard(pkg)
+
« no previous file with comments | « no previous file | pym/_emerge/FakeVartree.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698