In PackageIndex.readBody(), make each package entry
authorZac Medico <zmedico@gentoo.org>
Sat, 6 Oct 2007 22:02:10 +0000 (22:02 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 6 Oct 2007 22:02:10 +0000 (22:02 -0000)
inherit CHOST from the header.

svn path=/main/trunk/; revision=7987

pym/portage/getbinpkg.py

index 2aa8c97a5d6f71374b378c3446ac8c643878e054..8107207c21267a37949228b4eb7fab6633485b7e 100644 (file)
@@ -677,6 +677,7 @@ class PackageIndex(object):
                self.header.update(readpkgindex(pkgfile))
 
        def readBody(self, pkgfile):
+               header_chost = self.header.get("CHOST")
                while True:
                        d = readpkgindex(pkgfile)
                        if not d:
@@ -686,6 +687,8 @@ class PackageIndex(object):
                                continue
                        d.setdefault("EAPI", "0")
                        d.setdefault("SLOT", "0")
+                       if header_chost:
+                               d.setdefault("CHOST", header_chost)
                        self.packages[mycpv] = d
 
        def write(self, pkgfile):