diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-16 06:50:44 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-16 06:50:44 -0700 |
commit | 0817d69b5206d628c97177bbe2871146fcd56590 (patch) | |
tree | f27275343efc1d5f6b5133a445669a088a2f11aa | |
parent | 63890ab30b03585ed6db7f3ca3383141fb2fddb6 (diff) | |
download | portage-0817d69b5206d628c97177bbe2871146fcd56590.tar.gz portage-0817d69b5206d628c97177bbe2871146fcd56590.tar.bz2 portage-0817d69b5206d628c97177bbe2871146fcd56590.zip |
Revert back to using portdbapi.getFetchMap() since the Package class
doesn't cache SRC_URI.
-rw-r--r-- | pym/_emerge/EbuildFetcher.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pym/_emerge/EbuildFetcher.py b/pym/_emerge/EbuildFetcher.py index 800aefd13..7f5bc6df4 100644 --- a/pym/_emerge/EbuildFetcher.py +++ b/pym/_emerge/EbuildFetcher.py @@ -10,7 +10,6 @@ from portage import _unicode_encode from portage import _unicode_decode import codecs from portage.elog.messages import eerror -from portage.dbapi.porttree import _parse_uri_map from portage.util import writemsg_stdout from portage.util._pty import _create_pty_or_pipe @@ -27,7 +26,7 @@ class EbuildFetcher(SpawnProcess): raise AssertionError("ebuild not found for '%s'" % self.pkg.cpv) try: - uri_map = self._get_uri_map() + uri_map = self._get_uri_map(portdb, ebuild_path) except portage.exception.InvalidDependString as e: msg_lines = [] msg = "Fetch failed for '%s' due to invalid SRC_URI: %s" % \ @@ -94,14 +93,16 @@ class EbuildFetcher(SpawnProcess): self.env = fetch_env SpawnProcess._start(self) - def _get_uri_map(self): + def _get_uri_map(self, portdb, ebuild_path): """ - This can raise InvalidDependString from _parse_uri_map(). + This can raise InvalidDependString from portdbapi.getFetchMap(). """ + pkgdir = os.path.dirname(ebuild_path) + mytree = os.path.dirname(os.path.dirname(pkgdir)) use = None if not self.fetchall: use = self.pkg.use.enabled - return _parse_uri_map(self.pkg.cpv, self.pkg.metadata, use=use) + return portdb.getFetchMap(self.pkg.cpv, useflags=use, mytree=mytree) def _prefetch_size_ok(self, uri_map, settings, ebuild_path): pkgdir = os.path.dirname(ebuild_path) |