from portage._sets.base import InternalPackageSet
from _emerge.BlockerCache import BlockerCache
-from _emerge.FakeVartree import FakeVartree
from _emerge.show_invalid_depstring_notice import show_invalid_depstring_notice
if sys.hexversion >= 0x3000000:
class BlockerDB(object):
- def __init__(self, root_config):
+ def __init__(self, fake_vartree):
+ root_config = fake_vartree._root_config
self._root_config = root_config
self._vartree = root_config.trees["vartree"]
self._portdb = root_config.trees["porttree"].dbapi
self._dep_check_trees = None
- self._fake_vartree = None
+ self._fake_vartree = fake_vartree
+ self._dep_check_trees = {
+ self._vartree.root : {
+ "porttree" : fake_vartree,
+ "vartree" : fake_vartree,
+ }}
def _get_fake_vartree(self, acquire_lock=0):
fake_vartree = self._fake_vartree
- if fake_vartree is None:
- fake_vartree = FakeVartree(self._root_config)
- self._fake_vartree = fake_vartree
- self._dep_check_trees = { self._vartree.root : {
- "porttree" : fake_vartree,
- "vartree" : fake_vartree,
- }}
fake_vartree.sync(acquire_lock=acquire_lock)
return fake_vartree
from _emerge.create_depgraph_params import create_depgraph_params
from _emerge.create_world_atom import create_world_atom
from _emerge.DepPriority import DepPriority
-from _emerge.depgraph import depgraph, resume_depgraph
+from _emerge.depgraph import depgraph, resume_depgraph, \
+ _frozen_depgraph_config
from _emerge.EbuildFetcher import EbuildFetcher
from _emerge.EbuildPhase import EbuildPhase
from _emerge.emergelog import emergelog, _emerge_log_dir
self.edebug = 0
if settings.get("PORTAGE_DEBUG", "") == "1":
self.edebug = 1
- self.pkgsettings = {}
self._config_pool = {}
# TODO: Replace the BlockerDB with a depgraph of installed packages
# that's updated incrementally with each upgrade/uninstall operation
# This will be useful for making quick and safe decisions with respect
# to aggressive parallelization discussed in bug #279623.
+ frozen_config = None
+ if frozen_config is None:
+ frozen_config = _frozen_depgraph_config(settings, trees,
+ myopts, None)
+ self._frozen_config = frozen_config
+ self.pkgsettings = frozen_config.pkgsettings
self._blocker_db = {}
for root in trees:
self._config_pool[root] = []
- self._blocker_db[root] = BlockerDB(trees[root]["root_config"])
+ self._blocker_db[root] = BlockerDB(
+ frozen_config.trees[root]["vartree"])
fetch_iface = self._fetch_iface_class(log_file=self._fetch_log,
schedule=self._schedule_fetch)