From: Zac Medico Date: Fri, 31 Dec 2010 07:55:19 +0000 (-0800) Subject: Binpkg: implement REPLACING_VERSIONS X-Git-Tag: v2.1.9.27~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=320d1d2e586fbe0e9f3d771bf908360e7d173497;p=portage.git Binpkg: implement REPLACING_VERSIONS --- diff --git a/pym/_emerge/Binpkg.py b/pym/_emerge/Binpkg.py index 8b93a2dfb..65a5ef4a5 100644 --- a/pym/_emerge/Binpkg.py +++ b/pym/_emerge/Binpkg.py @@ -9,6 +9,7 @@ from _emerge.CompositeTask import CompositeTask from _emerge.BinpkgVerifier import BinpkgVerifier from _emerge.EbuildMerge import EbuildMerge from _emerge.EbuildBuildDir import EbuildBuildDir +from portage.eapi import eapi_exports_replace_vars from portage.util import writemsg import portage from portage import os @@ -57,6 +58,13 @@ class Binpkg(CompositeTask): settings.configdict["pkg"]["EMERGE_FROM"] = "binary" settings.configdict["pkg"]["MERGE_TYPE"] = "binary" + if eapi_exports_replace_vars(settings["EAPI"]): + vardb = self.pkg.root_config.trees["vartree"].dbapi + settings["REPLACING_VERSIONS"] = " ".join( + set(portage.versions.cpv_getversion(x) \ + for x in vardb.match(self.pkg.slot_atom) + \ + vardb.match('='+self.pkg.cpv))) + # The prefetcher has already completed or it # could be running now. If it's running now, # wait for it to complete since it holds