summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-10-15 15:55:31 -0700
committerZac Medico <zmedico@gentoo.org>2011-10-15 15:55:31 -0700
commit0a60f0a859994ca2ed51aa0b20454743f970b956 (patch)
treeaa5209d72137c606e127e3cf90beba1ec5d2ad33
parentEbuildMetadataPhase: fix broken _metadata_callback (diff)
downloadportage-0a60f0a859994ca2ed51aa0b20454743f970b956.tar.gz
portage-0a60f0a859994ca2ed51aa0b20454743f970b956.tar.bz2
portage-0a60f0a859994ca2ed51aa0b20454743f970b956.zip
EbuildMetadataPhase: fix parse-eapi-ebuild-head
This fixes bugs that can only be triggered by egencache since other callers handle parse-eapi-ebuild-head earlier.
-rw-r--r--pym/_emerge/EbuildMetadataPhase.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pym/_emerge/EbuildMetadataPhase.py b/pym/_emerge/EbuildMetadataPhase.py
index a6630ad10..6ef7c0010 100644
--- a/pym/_emerge/EbuildMetadataPhase.py
+++ b/pym/_emerge/EbuildMetadataPhase.py
@@ -44,8 +44,9 @@ class EbuildMetadataPhase(SubProcess):
if eapi is not None:
if not portage.eapi_is_supported(eapi):
+ self.metadata = {'EAPI' : eapi}
self.metadata_callback(self.cpv,
- self.repo_path, {'EAPI' : eapi}, self.ebuild_hash)
+ self.repo_path, self.metadata, self.ebuild_hash)
self._set_returncode((self.pid, os.EX_OK << 8))
self.wait()
return
@@ -117,7 +118,11 @@ class EbuildMetadataPhase(SubProcess):
def _set_returncode(self, wait_retval):
SubProcess._set_returncode(self, wait_retval)
- if self.returncode == os.EX_OK:
+ # self._raw_metadata is None when _start returns
+ # early due to an unsupported EAPI detected with
+ # FEATURES=parse-eapi-ebuild-head
+ if self.returncode == os.EX_OK and \
+ self._raw_metadata is not None:
metadata_lines = _unicode_decode(b''.join(self._raw_metadata),
encoding=_encodings['repo.content'],
errors='replace').splitlines()