From 34055adae6bd90fc64f18421e2cec5f8da6f7c33 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 17 Feb 2015 14:56:47 -0800 Subject: binpkg-multi-instance 1 of 7 Extend the _pkg_str class with build_id, build_time, file_size, and mtime attributes. These will be used to distinguish binary package instances that have the same cpv. Package sorting accounts for build_time, which will be used to prefer newer builds over older builds when their versions are identical. --- pym/portage/dbapi/vartree.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pym/portage/dbapi/vartree.py') diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index cf31c8e9c..277c2f188 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -173,7 +173,8 @@ class vardbapi(dbapi): self.vartree = vartree self._aux_cache_keys = set( ["BUILD_TIME", "CHOST", "COUNTER", "DEPEND", "DESCRIPTION", - "EAPI", "HDEPEND", "HOMEPAGE", "IUSE", "KEYWORDS", + "EAPI", "HDEPEND", "HOMEPAGE", + "BUILD_ID", "IUSE", "KEYWORDS", "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND", "repository", "RESTRICT" , "SLOT", "USE", "DEFINED_PHASES", "PROVIDES", "REQUIRES" @@ -425,7 +426,10 @@ class vardbapi(dbapi): continue if len(mysplit) > 1: if ps[0] == mysplit[1]: - returnme.append(_pkg_str(mysplit[0]+"/"+x)) + cpv = "%s/%s" % (mysplit[0], x) + metadata = dict(zip(self._aux_cache_keys, + self.aux_get(cpv, self._aux_cache_keys))) + returnme.append(_pkg_str(cpv, metadata=metadata)) self._cpv_sort_ascending(returnme) if use_cache: self.cpcache[mycp] = [mystat, returnme[:]] -- cgit v1.2.3-65-gdbad