summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/EbuildMetadataPhase.py
diff options
context:
space:
mode:
authorBrian Harring <ferringb@chromium.org>2011-10-13 23:27:22 -0700
committerZac Medico <zmedico@gentoo.org>2011-10-14 16:50:20 -0700
commit2ed1cb53cc4158af08c22d466b15b9a9a7767212 (patch)
tree9c2f87cfccd2f304baaece4b88db48a1f35db847 /pym/_emerge/EbuildMetadataPhase.py
parent90012f94f00ec2cf6b355bd9c30215b83c2b5b7f (diff)
downloadportage-2ed1cb53cc4158af08c22d466b15b9a9a7767212.tar.gz
portage-2ed1cb53cc4158af08c22d466b15b9a9a7767212.tar.bz2
portage-2ed1cb53cc4158af08c22d466b15b9a9a7767212.zip
cache: rewrite to support arbitrary validation method
Specifically, the cache can use any portage supported checksum method, or use the standard mtime approach. In addition, support controlling whether or not paths are stored, and generally try to restore some of the centralization/encapsulation that was in place originally. (cherry picked from commit bc1aed614fb588f0ade5bcb5d1265a8db0f8d247) Change-Id: Ic38057e7dbb15063c64a93c99e66e113a7d4c70e
Diffstat (limited to 'pym/_emerge/EbuildMetadataPhase.py')
-rw-r--r--pym/_emerge/EbuildMetadataPhase.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/pym/_emerge/EbuildMetadataPhase.py b/pym/_emerge/EbuildMetadataPhase.py
index e53298bae..aeff2f0e8 100644
--- a/pym/_emerge/EbuildMetadataPhase.py
+++ b/pym/_emerge/EbuildMetadataPhase.py
@@ -20,8 +20,8 @@ class EbuildMetadataPhase(SubProcess):
used to extract metadata from the ebuild.
"""
- __slots__ = ("cpv", "ebuild_path", "fd_pipes", "metadata_callback",
- "ebuild_mtime", "metadata", "portdb", "repo_path", "settings") + \
+ __slots__ = ("cpv", "ebuild_hash", "fd_pipes", "metadata_callback",
+ "metadata", "portdb", "repo_path", "settings") + \
("_raw_metadata",)
_file_names = ("ebuild",)
@@ -31,7 +31,7 @@ class EbuildMetadataPhase(SubProcess):
def _start(self):
settings = self.settings
settings.setcpv(self.cpv)
- ebuild_path = self.ebuild_path
+ ebuild_path = self.ebuild_hash.location
eapi = None
if eapi is None and \
@@ -44,8 +44,8 @@ class EbuildMetadataPhase(SubProcess):
if eapi is not None:
if not portage.eapi_is_supported(eapi):
- self.metadata_callback(self.cpv, self.ebuild_path,
- self.repo_path, {'EAPI' : eapi}, self.ebuild_mtime)
+ self.metadata_callback(self.cpv, ebuild_path,
+ self.repo_path, {'EAPI' : eapi}, self.ebuild_hash.mtime)
self._set_returncode((self.pid, os.EX_OK << 8))
self.wait()
return
@@ -128,6 +128,5 @@ class EbuildMetadataPhase(SubProcess):
else:
metadata = zip(portage.auxdbkeys, metadata_lines)
self.metadata = self.metadata_callback(self.cpv,
- self.ebuild_path, self.repo_path, metadata,
- self.ebuild_mtime)
+ self.repo_path, metadata, self.ebuild_hash)