summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-03-02 20:19:57 +0000
committerZac Medico <zmedico@gentoo.org>2010-03-02 20:19:57 +0000
commita2e290674596382f1279d6dec83a43d1b78c9cd8 (patch)
tree7efe1a6e12bcdea276517135e450ce121c869bd0 /pym
parent15f89bc7b22ce7a02db1cf740ce10a550ea81dbb (diff)
downloadportage-a2e290674596382f1279d6dec83a43d1b78c9cd8.tar.gz
portage-a2e290674596382f1279d6dec83a43d1b78c9cd8.tar.bz2
portage-a2e290674596382f1279d6dec83a43d1b78c9cd8.zip
Make sure that config._accept_chost() accepts empty CHOST. (trunk r15354)
svn path=/main/branches/2.1.7/; revision=15581
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 1330263cb..1afb46ba0 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3242,8 +3242,9 @@ class config(object):
(" ".join(accept_chost), e), noiselevel=-1)
self._accept_chost_re = re.compile("^$")
- return self._accept_chost_re.match(
- metadata.get('CHOST', '')) is not None
+ pkg_chost = metadata.get('CHOST', '')
+ return not pkg_chost or \
+ self._accept_chost_re.match(pkg_chost) is not None
def setinst(self,mycpv,mydbapi):
"""This updates the preferences for old-style virtuals,