user doesn't necessarily need write access to the vardb in cases where
global updates are necessary (updates are performed when necessary if there
is not a matching ebuild in the tree)."""
- def __init__(self, real_vartree, portdb):
+ def __init__(self, real_vartree, portdb, db_keys):
self.root = real_vartree.root
self.settings = real_vartree.settings
+ mykeys = db_keys[:]
+ for required_key in ("COUNTER", "SLOT"):
+ if required_key not in mykeys:
+ mykeys.append(required_key)
self.dbapi = portage.fakedbapi(settings=real_vartree.settings)
vdb_path = os.path.join(self.root, portage.VDB_PATH)
try:
try:
if os.access(vdb_path, os.W_OK):
vdb_lock = portage_locks.lockdir(vdb_path)
- mykeys = ["SLOT", "COUNTER", "PROVIDE", "USE", "IUSE",
- "RESTRICT", "DEPEND", "RDEPEND", "PDEPEND", "repository"]
real_dbapi = real_vartree.dbapi
slot_counters = {}
for cpv in real_dbapi.cpv_all():
self.trees[myroot][tree] = trees[myroot][tree]
self.trees[myroot]["vartree"] = \
FakeVartree(trees[myroot]["vartree"],
- trees[myroot]["porttree"].dbapi)
+ trees[myroot]["porttree"].dbapi,
+ self._mydbapi_keys)
self.pkgsettings[myroot] = portage.config(
clone=self.trees[myroot]["vartree"].settings)
self.pkg_node_map[myroot] = {}
dep_check_trees = {}
dep_check_trees[myroot] = {}
dep_check_trees[myroot]["vartree"] = \
- FakeVartree(trees[myroot]["vartree"], trees[myroot]["porttree"].dbapi)
+ FakeVartree(trees[myroot]["vartree"],
+ trees[myroot]["porttree"].dbapi.
+ depgraph._mydbapi_keys)
vardb = dep_check_trees[myroot]["vartree"].dbapi
# Constrain dependency selection to the installed packages.
dep_check_trees[myroot]["porttree"] = dep_check_trees[myroot]["vartree"]