portage._doebuild_manifest_exempt_depend += 1
pkgdir = os.path.dirname(myebuild)
fetchlist_dict = portage.FetchlistDict(pkgdir, mysettings, mydbapi)
- from portage.manifest import Manifest
- mf = Manifest(pkgdir, mysettings["DISTDIR"],
+ mf = mysettings.repositories.get_repo_for_location(
+ os.path.dirname(os.path.dirname(pkgdir)))
+ mf = mf.load_manifest(pkgdir, mysettings["DISTDIR"],
fetchlist_dict=fetchlist_dict, manifest1_compat=False)
mf.create(requiredDistfiles=None,
assumeDistHashesSometimes=True, assumeDistHashesAlways=True)
portage._doebuild_manifest_exempt_depend += 1
try:
distdir = repoman_settings['DISTDIR']
- mf = portage.manifest.Manifest(checkdir, distdir,
+ mf = repoman_settings.repositories.get_repo_for_location(
+ os.path.dirname(os.path.dirname(checkdir)))
+ mf = mf.load_manifest(checkdir, distdir,
fetchlist_dict=fetchlist_dict)
mf.create(requiredDistfiles=None,
assumeDistHashesAlways=True)
raise
continue
- mf = Manifest(checkdir, repoman_settings["DISTDIR"])
+ mf = repoman_settings.repositories.get_repo_for_location(
+ os.path.dirname(os.path.dirname(checkdir)))
+ mf = mf.load_manifest(checkdir, repoman_settings["DISTDIR"])
mydigests=mf.getTypeDigests("DIST")
fetchlist_dict = portage.FetchlistDict(checkdir, repoman_settings, portdb)
def _get_digests(self):
if self._digests is not None:
return self._digests
- self._digests = portage.Manifest(os.path.dirname(
- self._get_ebuild_path()), None).getTypeDigests("DIST")
+ pkgdir = os.path.dirname(self._get_ebuild_path())
+ mf = self.pkg.root_config.settings.repositories.get_repo_for_location(
+ os.path.dirname(os.path.dirname(pkgdir)))
+ self._digests = mf.load_manifest(pkgdir, None).getTypeDigests("DIST")
return self._digests
def _get_uri_map(self):
installed=False, metadata=metadata,
root_config=self.root_config, type_name="ebuild")
pkgdir = os.path.dirname(myebuild)
- mf = Manifest(
+ mf = self.settings.repositories.get_repo_for_location(
+ os.path.dirname(os.path.dirname(pkgdir)))
+ mf = mf.load_manifest(
pkgdir, self.settings["DISTDIR"])
try:
uri_map = _parse_uri_map(mycpv, metadata,
if myebuild is None:
raise AssertionError(_("ebuild not found for '%s'") % mypkg)
pkgdir = os.path.dirname(myebuild)
- mf = Manifest(pkgdir, self.settings["DISTDIR"])
+ mf = self.repositories.get_repo_for_location(
+ os.path.dirname(os.path.dirname(pkgdir))).load_manifest(
+ pkgdir, self.settings["DISTDIR"])
checksums = mf.getDigests()
if not checksums:
if debug:
if myebuild is None:
raise AssertionError(_("ebuild not found for '%s'") % mypkg)
pkgdir = os.path.dirname(myebuild)
- mf = Manifest(pkgdir, self.settings["DISTDIR"])
+ mf = self.repositories.get_repo_for_location(
+ os.path.dirname(os.path.dirname(pkgdir)))
+ mf = mf.load_manifest(pkgdir, self.settings["DISTDIR"])
mysums = mf.getDigests()
failures = {}
else:
return 1
if mf is None:
- mf = Manifest(pkgdir, mysettings["DISTDIR"])
+ mf = mysettings.repositories.get_repo_for_location(
+ os.path.dirname(os.path.dirname(pkgdir)))
+ mf = mf.load_manifest(pkgdir, mysettings["DISTDIR"])
manifest_empty = True
for d in mf.fhashdict.values():
if d:
return 0
mytree = os.path.dirname(os.path.dirname(mysettings["O"]))
manifest1_compat = False
- mf = Manifest(mysettings["O"], mysettings["DISTDIR"],
+ mf = mysettings.repositories.get_repo_for_location(mytree)
+ mf = mf.load_manifest(mysettings["O"], mysettings["DISTDIR"],
fetchlist_dict=fetchlist_dict, manifest1_compat=manifest1_compat)
# Don't require all hashes since that can trigger excessive
# fetches when sufficient digests already exist. To ease transition
out.eerror(_("Manifest not found for '%s'") % (myebuild,))
_doebuild_broken_ebuilds.add(myebuild)
return 1
- mf = Manifest(pkgdir, mysettings["DISTDIR"])
+ mf = mysettings.repositories.get_repo_for_location(
+ os.path.dirname(os.path.dirname(pkgdir)))
+ mf = mf.load_manifest(pkgdir, mysettings["DISTDIR"])
else:
mf = _doebuild_manifest_cache
allow_missing_digests = True
pkgdir = mysettings.get("O")
if digests is None and not (pkgdir is None or skip_manifest):
- mydigests = Manifest(
+ mydigests = mysettings.repositories.get_repo_for_location(
+ os.path.dirname(os.path.dirname(pkgdir))).load_manifest(
pkgdir, mysettings["DISTDIR"]).getTypeDigests("DIST")
elif digests is None or skip_manifest:
# no digests because fetch was not called for a specific package
from portage.localization import _
from portage import _unicode_encode
from portage import _encodings
+from portage import manifest
_repo_name_sub_re = re.compile(r'[^\w-]')
"""Stores config of one repository"""
__slots__ = ['aliases', 'eclass_overrides', 'eclass_locations', 'location', 'user_location', 'masters', 'main_repo',
- 'missing_repo_name', 'name', 'priority', 'sync', 'format']
+ 'missing_repo_name', 'name', 'priority', 'sync', 'format', 'load_manifest']
def __init__(self, name, repo_opts):
"""Build a RepoConfig with options in repo_opts
missing = False
self.name = name
self.missing_repo_name = missing
+ self.load_manifest = manifest.Manifest
def update(self, new_repo):
"""Update repository with options in another RepoConfig"""
return None
return self.treemap[repo_name]
+ def get_repo_for_location(self, location):
+ return self.prepos[self.get_name_for_location(location)]
+
def __getitem__(self, repo_name):
return self.prepos[repo_name]