aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/ebuild.cc')
-rw-r--r--paludis/repositories/e/ebuild.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 7b3f5255b..e60bf6994 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -1092,6 +1092,27 @@ EbuildPretendCommand::extend_command(Process & process)
process.setenv(params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_use_expand_hidden(),
pretend_params.use_expand_hidden());
+ if (! params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_replacing_ids().empty())
+ process.setenv(params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_replacing_ids(),
+ join(indirect_iterator(pretend_params.replacing_ids()->begin()),
+ indirect_iterator(pretend_params.replacing_ids()->end()), " "));
+
+ if (! params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_replacing_versions().empty())
+ {
+ std::string s;
+ for (PackageIDSequence::ConstIterator i(pretend_params.replacing_ids()->begin()),
+ i_end(pretend_params.replacing_ids()->end()) ;
+ i != i_end ; ++i)
+ if ((*i)->name() == params.package_id()->name())
+ {
+ if (! s.empty())
+ s.append(" ");
+ s.append(stringify((*i)->version()));
+ }
+
+ process.setenv(params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_replacing_versions(), s);
+ }
+
for (Map<std::string, std::string>::ConstIterator
i(pretend_params.expand_vars()->begin()),
j(pretend_params.expand_vars()->end()) ; i != j ; ++i)