aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild_entries.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/ebuild_entries.cc')
-rw-r--r--paludis/repositories/e/ebuild_entries.cc27
1 files changed, 23 insertions, 4 deletions
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index 1c78c5434..c8a0e231e 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -534,6 +534,16 @@ namespace
else
return ! b->slot_key();
}
+
+ void used_this_for_config_protect(std::string & s, const std::string & v)
+ {
+ s = v;
+ }
+
+ std::tr1::shared_ptr<OutputManager> this_output_manager(const std::tr1::shared_ptr<OutputManager> & o, const Action &)
+ {
+ return o;
+ }
}
void
@@ -639,6 +649,8 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
FSEntry package_builddir(_imp->params.builddir() / (stringify(id->name().category()) + "-" +
stringify(id->name().package()) + "-" + stringify(id->version())));
+ std::string used_config_protect;
+
EAPIPhases phases(id->eapi()->supported()->ebuild_phases()->ebuild_install());
for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
phase != phase_end ; ++phase)
@@ -688,7 +700,9 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
value_for<n::options>(id->eapi()->supported()->merger_options()),
value_for<n::output_manager>(output_manager),
value_for<n::package_id>(id),
- value_for<n::used_this_for_config_protect>(install_action.options.used_this_for_config_protect())
+ value_for<n::perform_uninstall>(install_action.options.perform_uninstall()),
+ value_for<n::used_this_for_config_protect>(std::tr1::bind(
+ &used_this_for_config_protect, std::tr1::ref(used_config_protect), std::tr1::placeholders::_1))
));
}
else if (phase->option("strip"))
@@ -791,8 +805,6 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
}
}
- output_manager->succeeded();
-
for (PackageIDSequence::ConstIterator i(install_action.options.replacing()->begin()), i_end(install_action.options.replacing()->end()) ;
i != i_end ; ++i)
{
@@ -804,8 +816,15 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
if ((*i)->name() == id->name() && slot_is_same(*i, id))
continue;
- install_action.options.perform_uninstall()(*i);
+ UninstallActionOptions uo(make_named_values<UninstallActionOptions>(
+ value_for<n::config_protect>(used_config_protect),
+ value_for<n::is_overwrite>(false),
+ value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, output_manager, std::tr1::placeholders::_1))
+ ));
+ install_action.options.perform_uninstall()(*i, uo);
}
+
+ output_manager->succeeded();
}
void