from portage.dbapi.vartree import vartree
from portage.dep._slot_operator import find_built_slot_operator_atoms
from portage.eapi import _get_eapi_attrs
-from portage.exception import InvalidDependString
-from portage.repository.config import _gen_valid_repo
+from portage.exception import InvalidData, InvalidDependString
from portage.update import grab_updates, parse_updates, update_dbentries
from portage.versions import _pkg_str
# a KeyError to the caller if appropriate.
pkg_obj = self.dbapi._cpv_map[pkg]
installed_eapi = pkg_obj.eapi
- repo = pkg_obj.metadata['repository']
eapi_attrs = _get_eapi_attrs(installed_eapi)
built_slot_operator_atoms = None
try:
# Use the live ebuild metadata if possible.
- repo = _gen_valid_repo(repo)
live_metadata = dict(zip(self._portdb_keys,
- self._portdb.aux_get(pkg, self._portdb_keys, myrepo=repo)))
+ self._portdb.aux_get(pkg, self._portdb_keys,
+ myrepo=pkg_obj.repo)))
# Use the metadata from the installed instance if the EAPI
# of either instance is unsupported, since if the installed
# instance has an unsupported or corrupt EAPI then we don't
if self.quiet_repo_display:
# overlay verbose
# assign index for a previous version in the same slot
- slot_matches = self.vardb.match(pkg.slot_atom)
+ slot_matches = self.vardb.match_pkgs(pkg.slot_atom)
if slot_matches:
- repo_name_prev = self.vardb.aux_get(slot_matches[0],
- ["repository"])[0]
+ repo_name_prev = slot_matches[0].repo
else:
repo_name_prev = None
pkg_info.repo_path_real = os.path.dirname(os.path.dirname(
os.path.dirname(pkg_info.ebuild_path)))
else:
- pkg_info.repo_path_real = \
- self.portdb.getRepositoryPath(pkg.metadata["repository"])
+ pkg_info.repo_path_real = self.portdb.getRepositoryPath(pkg.repo)
pkg_info.use = list(self.conf.pkg_use_enabled(pkg))
if not pkg.built and pkg.operation == 'merge' and \
'fetch' in pkg.metadata.restrict:
self.mergelist.append(x.atom)
else:
repo_str = ""
- if x.metadata["repository"] != "test_repo":
- repo_str = _repo_separator + x.metadata["repository"]
+ if x.repo != "test_repo":
+ repo_str = _repo_separator + x.repo
mergelist_str = x.cpv + repo_str
if x.built:
if x.operation == "merge":