summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-02-14 06:26:31 +0000
committerZac Medico <zmedico@gentoo.org>2010-02-14 06:26:31 +0000
commitf5cae350c6bfc5593503dafdd24b653d64f08336 (patch)
treeeb03d6165e3d293ca7b6d0941103cdeb2ffc3881
parent9889f355d890f0ad6e604f0064c2459273af35a4 (diff)
downloadportage-f5cae350c6bfc5593503dafdd24b653d64f08336.tar.gz
portage-f5cae350c6bfc5593503dafdd24b653d64f08336.tar.bz2
portage-f5cae350c6bfc5593503dafdd24b653d64f08336.zip
Make sure that config._accept_chost() accepts empty CHOST.
svn path=/main/trunk/; revision=15354
-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 e3e484fb1..2c2307bb6 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,