From 7ff6705dabeb4d6d2f8af4b1be09adc9fec3d0e5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 6 Oct 2007 20:24:36 +0000 Subject: [PATCH] Bug #194552 - Include EAPI in the binary package metadata index. svn path=/main/trunk/; revision=7986 --- pym/portage/dbapi/bintree.py | 2 +- pym/portage/getbinpkg.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 5ee45f975..fe4d968f9 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -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))) diff --git a/pym/portage/getbinpkg.py b/pym/portage/getbinpkg.py index 8225a8242..2aa8c97a5 100644 --- a/pym/portage/getbinpkg.py +++ b/pym/portage/getbinpkg.py @@ -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") == "": -- 2.26.2