[entropy.spm] PortagePlugin: fix package metadata extraction when CHOST file is not available

This commit is contained in:
Fabio Erculiani
2010-03-26 13:34:47 +01:00
parent 233bba17ed
commit 45e549281f
@@ -852,6 +852,14 @@ class PortagePlugin(SpmPlugin):
raise
data[item] = value
if not data['chost']:
# stupid portage devs and virtual pkgs!
# try to cope
# WARNING: this can be erroneously set to currently running
# system CHOST that could not match the CHOST the package was
# built with
data['chost'] = self.portage.settings['CHOST']
if not data['spm_repository']: # make sure it's set to None
data['spm_repository'] = None
@@ -3861,7 +3869,7 @@ class PortagePlugin(SpmPlugin):
},
'chost': {
'path': PortagePlugin.xpak_entries['chost'],
'critical': True,
'critical': False, # we deal with it afterwards
},
'description': {
'path': PortagePlugin.xpak_entries['description'],