bintree: handle pkgindex CHOST header like REPO
authorZac Medico <zmedico@gentoo.org>
Fri, 10 Jun 2011 12:21:06 +0000 (05:21 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 10 Jun 2011 12:21:06 +0000 (05:21 -0700)
This allows an existing CHOST header entry to properly override our
default.

pym/portage/dbapi/bintree.py

index 756ea67117389a75973ff9dd31bb6e0deabccc46..7af152cd7e96d92a937bc67707ac68a8e38523db 100644 (file)
@@ -249,7 +249,7 @@ class binarytree(object):
                        self._pkgindex_header_keys = set([
                                "ACCEPT_KEYWORDS", "ACCEPT_LICENSE",
                                "ACCEPT_PROPERTIES", "CBUILD",
-                               "CHOST", "CONFIG_PROTECT", "CONFIG_PROTECT_MASK", "FEATURES",
+                               "CONFIG_PROTECT", "CONFIG_PROTECT_MASK", "FEATURES",
                                "GENTOO_MIRRORS", "INSTALL_MASK", "SYNC", "USE"])
                        self._pkgindex_default_pkg_data = {
                                "BUILD_TIME"         : "",
@@ -274,6 +274,7 @@ class binarytree(object):
                        # Populate the header with appropriate defaults.
                        self._pkgindex_default_header_data = {
                                "VERSION"      : str(self._pkgindex_version),
+                               "CHOST"        : self.settings.get("CHOST", ""),
                                "repository"   : "",
                        }