Bug #194552 - Include EAPI in the binary package metadata index.
authorZac Medico <zmedico@gentoo.org>
Sat, 6 Oct 2007 20:24:36 +0000 (20:24 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 6 Oct 2007 20:24:36 +0000 (20:24 -0000)
svn path=/main/trunk/; revision=7986

pym/portage/dbapi/bintree.py
pym/portage/getbinpkg.py

index 5ee45f975b7809ac1efd8554e27f75d52aa3b1eb..fe4d968f992b407c624ce2312c6a3e3d0b17203d 100644 (file)
@@ -709,7 +709,7 @@ class binarytree(object):
                        # record location if it's non-default
                        if rel_path != cpv + ".tbz2":
                                d["PATH"] = rel_path
-                       keys = ["USE", "IUSE", "DESCRIPTION", "LICENSE", "PROVIDE", \
+                       keys = ["USE", "IUSE", "DESCRIPTION", "EAPI", "LICENSE", "PROVIDE", \
                                "RDEPEND", "DEPEND", "PDEPEND"]
                        from itertools import izip
                        d.update(izip(keys, self.dbapi.aux_get(cpv, keys)))
index 8225a8242a75da4839dd7c1bdaed56d0b9df0194..2aa8c97a5d6f71374b378c3446ac8c643878e054 100644 (file)
@@ -684,6 +684,7 @@ class PackageIndex(object):
                        mycpv = d.get("CPV")
                        if not mycpv:
                                continue
+                       d.setdefault("EAPI", "0")
                        d.setdefault("SLOT", "0")
                        self.packages[mycpv] = d
 
@@ -698,6 +699,8 @@ class PackageIndex(object):
                writepkgindex(pkgfile, [(k, self.header[k]) for k in keys])
                for cpv in cpv_all:
                        metadata = self.packages[cpv].copy()
+                       if metadata.get("EAPI") == "0":
+                               del metadata["EAPI"]
                        if metadata.get("SLOT") == "0":
                                del metadata["SLOT"]
                        if metadata.get("USE") == "":