self.pkgsettings = {}
self.pkg_node_map = {}
self.mydbapi = {}
+ self._mydbapi_keys = ["SLOT", "DEPEND", "RDEPEND", "PDEPEND"]
self.useFlags = {}
self.trees = {}
for myroot in trees:
fakedb = portage.fakedbapi(settings=self.pkgsettings[myroot])
self.mydbapi[myroot] = fakedb
for pkg in vardb.cpv_all():
- myslot = vardb.aux_get(pkg, ["SLOT"])[0]
- fakedb.cpv_inject(pkg, metadata={"SLOT":myslot})
+ fakedb.cpv_inject(pkg,
+ metadata=dict(izip(self._mydbapi_keys,
+ vardb.aux_get(pkg, self._mydbapi_keys))))
del vardb, fakedb
self.useFlags[myroot] = {}
if "--usepkg" in self.myopts:
priority=priority)
if addme:
- myslot = mydbapi.aux_get(mykey, ["SLOT"])[0]
- self.mydbapi[myroot].cpv_inject(mykey, metadata={"SLOT":myslot})
+ self.mydbapi[myroot].cpv_inject(mykey,
+ metadata=dict(izip(self._mydbapi_keys,
+ mydbapi.aux_get(mykey, self._mydbapi_keys))))
""" This section determines whether we go deeper into dependencies or not.
We want to go deeper on a few occasions: