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
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)
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)