From: Zac Medico Date: Tue, 17 Aug 2010 18:24:15 +0000 (-0700) Subject: Fix breakage in REPLACING_VERSIONS support for emerge. X-Git-Tag: v2.2_rc68~119 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1d5cff7b424635ee081c1e32956f3a6988864028;p=portage.git Fix breakage in REPLACING_VERSIONS support for emerge. --- diff --git a/pym/_emerge/EbuildExecuter.py b/pym/_emerge/EbuildExecuter.py index 158099340..513e67019 100644 --- a/pym/_emerge/EbuildExecuter.py +++ b/pym/_emerge/EbuildExecuter.py @@ -6,7 +6,8 @@ from _emerge.TaskSequence import TaskSequence from _emerge.CompositeTask import CompositeTask import portage from portage import os -from portage.eapi import eapi_has_src_prepare_and_src_configure +from portage.eapi import eapi_has_src_prepare_and_src_configure, \ + eapi_exports_replace_vars from portage.package.ebuild.doebuild import _prepare_env_file, \ _prepare_fake_distdir @@ -50,6 +51,13 @@ class EbuildExecuter(CompositeTask): settings.configdict["pkg"]["AA"] = " ".join(aalist) _prepare_fake_distdir(settings, alist) + if eapi_exports_replace_vars(settings['EAPI']): + vardb = pkg.root_config.trees['vartree'].dbapi + settings["REPLACING_VERSIONS"] = " ".join( + set(portage.versions.cpv_getversion(match) \ + for match in vardb.match(pkg.slot_atom) + \ + vardb.match('='+pkg.cpv))) + setup_phase = EbuildPhase(background=self.background, phase="setup", scheduler=scheduler, settings=settings) diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 6d7dbd9c3..43fa68a77 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -915,6 +915,12 @@ class Scheduler(PollScheduler): debug=(settings.get("PORTAGE_DEBUG", "") == 1), mydbapi=self.trees[settings["ROOT"]][tree].dbapi, use_cache=1) prepare_build_dirs(root_config.root, settings, cleanup=0) + + vardb = root_config.trees['vartree'].dbapi + settings["REPLACING_VERSIONS"] = " ".join( + set(portage.versions.cpv_getversion(match) \ + for match in vardb.match(x.slot_atom) + \ + vardb.match('='+x.cpv))) pretend_phase = EbuildPhase(background=self._background, phase="pretend", scheduler=self._sched_iface, settings=settings)