Make sure that config._accept_chost() accepts empty CHOST.
authorZac Medico <zmedico@gentoo.org>
Sun, 14 Feb 2010 06:26:31 +0000 (06:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 14 Feb 2010 06:26:31 +0000 (06:26 -0000)
svn path=/main/trunk/; revision=15354

pym/portage/__init__.py

index e3e484fb1935fb067f791207d6932c29549b3800..2c2307bb6dfd2a24f588d2f027d2e656c422d7d2 100644 (file)
@@ -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,