aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/e/e_repository.cc39
-rw-r--r--paludis/repositories/e/eapis/0.conf5
-rw-r--r--paludis/repositories/e/eapis/2.conf2
-rw-r--r--paludis/repositories/e/eapis/4.conf2
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf4
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf4
-rw-r--r--paludis/repositories/e/eapis/pbin-1+0.conf2
-rw-r--r--paludis/repositories/e/eapis/pbin-1+1.conf2
-rw-r--r--paludis/repositories/e/eapis/pbin-1+exheres-0.conf2
-rw-r--r--paludis/repositories/e/eapis/pbin-1+paludis-1.conf2
-rw-r--r--paludis/repositories/e/ebuild_id.cc4
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.cc8
-rw-r--r--paludis/repositories/unpackaged/unpackaged_key.cc1
13 files changed, 52 insertions, 25 deletions
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 8965c72..669d616 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -2256,6 +2256,10 @@ ERepository::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
std::string used_config_protect;
std::tr1::shared_ptr<FSEntrySet> merged_entries(new FSEntrySet);
+ std::tr1::shared_ptr<const ChoiceValue> preserve_work_choice(
+ id->choices_key()->value()->find_by_name_with_prefix(
+ ELikePreserveWorkChoiceValue::canonical_name_with_prefix()));
+
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)
@@ -2291,6 +2295,13 @@ ERepository::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
continue;
}
+ if (phase->option("tidyup") && preserve_work_choice && preserve_work_choice->enabled())
+ {
+ output_manager->stdout_stream() << "--- Skipping " << phase->equal_option("skipname")
+ << " phase to preserve work" << std::endl;
+ continue;
+ }
+
if (phase->option("merge"))
{
if (! (*install_action.options.destination()).destination_interface())
@@ -2298,18 +2309,22 @@ ERepository::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
+ "' to destination '" + stringify(install_action.options.destination()->name())
+ "' because destination does not provide destination_interface");
- (*install_action.options.destination()).destination_interface()->merge(
- make_named_values<MergeParams>(
- value_for<n::environment_file>(package_builddir / "temp" / "loadsaveenv"),
- value_for<n::image_dir>(package_builddir / "image"),
- value_for<n::merged_entries>(merged_entries),
- 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::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))
- ));
+ MergerOptions extra_merger_options;
+ if (preserve_work_choice && preserve_work_choice->enabled())
+ extra_merger_options += mo_nondestructive;
+
+ (*install_action.options.destination()).destination_interface()->merge(
+ make_named_values<MergeParams>(
+ value_for<n::environment_file>(package_builddir / "temp" / "loadsaveenv"),
+ value_for<n::image_dir>(package_builddir / "image"),
+ value_for<n::merged_entries>(merged_entries),
+ value_for<n::options>(id->eapi()->supported()->merger_options() | extra_merger_options),
+ value_for<n::output_manager>(output_manager),
+ value_for<n::package_id>(id),
+ 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"))
{
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index fe259b1..39739e7 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -114,13 +114,14 @@ ebuild_install = \
skipname=preinst skipifno=preinst clearenv prepost : loadenv preinst saveenv ; \
skipname=merge merge : ; \
skipname=postinst skipifno=postinst clearenv prepost : loadenv postinst saveenv ; \
- skipname=tidyup : tidyup
+ skipname=tidyup tidyup : tidyup
ebuild_uninstall = \
skipname=killold skipifno=prerm,postrm : killold ; \
skipname=prerm skipifno=prerm,postrm : initmisc prerm saveenv ; \
unmerge : ; \
- skipname=postrm skipifno=prerm,postrm clearenv : loadenv postrm tidyup ;
+ skipname=postrm skipifno=prerm,postrm clearenv : loadenv postrm ; \
+ skipname=tidyup skipifno=prerm,postrm : tidyup
ebuild_pretend =
diff --git a/paludis/repositories/e/eapis/2.conf b/paludis/repositories/e/eapis/2.conf
index a01193f..e95d5d6 100644
--- a/paludis/repositories/e/eapis/2.conf
+++ b/paludis/repositories/e/eapis/2.conf
@@ -25,7 +25,7 @@ ebuild_install = \
skipname=preinst skipifno=preinst clearenv prepost : loadenv preinst saveenv ; \
skipname=merge merge : ; \
skipname=postinst skipifno=postinst clearenv prepost : loadenv postinst saveenv ; \
- skipname=tidyup : tidyup
+ skipname=tidyup tidyup : tidyup
ebuild_new_upgrade_phase_order = true
diff --git a/paludis/repositories/e/eapis/4.conf b/paludis/repositories/e/eapis/4.conf
index dce56ff..4046369 100644
--- a/paludis/repositories/e/eapis/4.conf
+++ b/paludis/repositories/e/eapis/4.conf
@@ -23,7 +23,7 @@ ebuild_install = \
skipname=preinst skipifno=preinst clearenv prepost : loadenv preinst saveenv ; \
skipname=merge merge : ; \
skipname=postinst skipifno=postinst clearenv prepost : loadenv postinst saveenv ; \
- skipname=tidyup : tidyup
+ skipname=tidyup tidyup : tidyup
ebuild_info = \
: killold ; \
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index f96807e..b214f01 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -145,14 +145,14 @@ ebuild_install = \
skipname=preinst skipifno=preinst sydbox clearenv prepost : loadenv preinst saveenv ; \
skipname=merge merge : ; \
skipname=postinst skipifno=postinst sydbox clearenv prepost : loadenv postinst saveenv ; \
- skipname=tidyup : tidyup
+ skipname=tidyup tidyup : tidyup
ebuild_uninstall = \
skipname=killold skipifno=prerm,postrm : killold ; \
skipname=prerm skipifno=prerm,postrm sydbox : initmisc prerm saveenv ; \
unmerge : ; \
skipname=postrm skipifno=prerm,postrm sydbox clearenv : loadenv postrm ; \
- skipname=tidyup skipifno=prerm,postrm : tidyup
+ skipname=tidyup skipifno=prerm,postrm tidyup : tidyup
ebuild_pretend = \
skipname=pretend skipifno=pretend sydbox userpriv : pretend
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index 4c2871a..6253ff5 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -116,14 +116,14 @@ ebuild_install = \
skipname=preinst skipifno=preinst sandbox clearenv prepost : loadenv preinst saveenv ; \
skipname=merge merge : ; \
skipname=postinst skipifno=postinst sandbox clearenv prepost : loadenv postinst saveenv ; \
- skipname=tidyup : tidyup
+ skipname=tidyup tidyup : tidyup
ebuild_uninstall = \
skipname=killold skipifno=prerm,postrm : killold ; \
skipname=prerm skipifno=prerm,postrm sandbox : initmisc prerm saveenv ; \
unmerge : ; \
skipname=postrm skipifno=prerm,postrm sandbox clearenv : loadenv postrm ; \
- skipname=tidyup skipifno=prerm,postrm : tidyup
+ skipname=tidyup skipifno=prerm,postrm tidyup : tidyup
ebuild_pretend = \
skipname=pretend skipifno=pretend sandbox userpriv : pretend
diff --git a/paludis/repositories/e/eapis/pbin-1+0.conf b/paludis/repositories/e/eapis/pbin-1+0.conf
index 810a24e..319b7d2 100644
--- a/paludis/repositories/e/eapis/pbin-1+0.conf
+++ b/paludis/repositories/e/eapis/pbin-1+0.conf
@@ -31,7 +31,7 @@ ebuild_install = \
skipname=preinst clearenv prepost : loadenv preinst saveenv ; \
skipname=merge merge : ; \
skipname=postinst clearenv prepost : loadenv postinst saveenv ; \
- skipname=tidyup : tidyup
+ skipname=tidyup tidyup : tidyup
description_generated_using = Generated using
description_generated_time = Generated time
diff --git a/paludis/repositories/e/eapis/pbin-1+1.conf b/paludis/repositories/e/eapis/pbin-1+1.conf
index 74d7705..fe01a58 100644
--- a/paludis/repositories/e/eapis/pbin-1+1.conf
+++ b/paludis/repositories/e/eapis/pbin-1+1.conf
@@ -31,7 +31,7 @@ ebuild_install = \
skipname=preinst clearenv prepost : loadenv preinst saveenv ; \
skipname=merge merge : ; \
skipname=postinst clearenv prepost : loadenv postinst saveenv ; \
- skipname=tidyup : tidyup
+ skipname=tidyup tidyup : tidyup
description_generated_using = Generated using
description_generated_time = Generated time
diff --git a/paludis/repositories/e/eapis/pbin-1+exheres-0.conf b/paludis/repositories/e/eapis/pbin-1+exheres-0.conf
index 0d81be0..fec47f3 100644
--- a/paludis/repositories/e/eapis/pbin-1+exheres-0.conf
+++ b/paludis/repositories/e/eapis/pbin-1+exheres-0.conf
@@ -32,7 +32,7 @@ ebuild_install = \
skipname=preinst clearenv prepost : loadenv preinst saveenv ; \
skipname=merge merge : ; \
skipname=postinst clearenv prepost : loadenv postinst saveenv ; \
- skipname=tidyup : tidyup
+ skipname=tidyup tidyup : tidyup
description_generated_using = Generated using
description_generated_time = Generated time
diff --git a/paludis/repositories/e/eapis/pbin-1+paludis-1.conf b/paludis/repositories/e/eapis/pbin-1+paludis-1.conf
index 5bf6708..ba74f78 100644
--- a/paludis/repositories/e/eapis/pbin-1+paludis-1.conf
+++ b/paludis/repositories/e/eapis/pbin-1+paludis-1.conf
@@ -32,7 +32,7 @@ ebuild_install = \
skipname=preinst clearenv prepost : loadenv preinst saveenv ; \
skipname=merge merge : ; \
skipname=postinst clearenv prepost : loadenv postinst saveenv ; \
- skipname=tidyup : tidyup
+ skipname=tidyup tidyup : tidyup
description_generated_using = Generated using
description_generated_time = Generated time
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 5239eed..d6f17c5 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -1426,6 +1426,10 @@ EbuildID::add_build_options(const std::tr1::shared_ptr<Choices> & choices) const
build_options->add(make_shared_ptr(new ELikeTraceChoiceValue(
shared_from_this(), _imp->environment, build_options)));
+ /* preserve_work */
+ build_options->add(make_shared_ptr(new ELikePreserveWorkChoiceValue(
+ shared_from_this(), _imp->environment, build_options)));
+
/* jobs */
if (! eapi()->supported()->ebuild_environment_variables()->env_jobs().empty())
{
diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc
index cb8af6f..5f684f2 100644
--- a/paludis/repositories/unpackaged/unpackaged_id.cc
+++ b/paludis/repositories/unpackaged/unpackaged_id.cc
@@ -363,6 +363,8 @@ UnpackagedID::perform_action(Action & action) const
ELikeStripChoiceValue::canonical_name_with_prefix()));
std::tr1::shared_ptr<const ChoiceValue> split_choice(choices_key()->value()->find_by_name_with_prefix(
ELikeSplitChoiceValue::canonical_name_with_prefix()));
+ std::tr1::shared_ptr<const ChoiceValue> preserve_work_choice(choices_key()->value()->find_by_name_with_prefix(
+ ELikePreserveWorkChoiceValue::canonical_name_with_prefix()));
std::string used_config_protect;
@@ -397,12 +399,16 @@ UnpackagedID::perform_action(Action & action) const
{
case wp_yes:
{
+ MergerOptions extra_merger_options;
+ if (preserve_work_choice && preserve_work_choice->enabled())
+ extra_merger_options += mo_nondestructive;
(*install_action->options.destination()).destination_interface()->merge(
make_named_values<MergeParams>(
value_for<n::environment_file>(FSEntry("/dev/null")),
value_for<n::image_dir>(fs_location_key()->value()),
value_for<n::merged_entries>(make_shared_ptr(new FSEntrySet)),
- value_for<n::options>(MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs),
+ value_for<n::options>((MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs)
+ | extra_merger_options),
value_for<n::output_manager>(output_manager),
value_for<n::package_id>(shared_from_this()),
value_for<n::perform_uninstall>(install_action->options.perform_uninstall()),
diff --git a/paludis/repositories/unpackaged/unpackaged_key.cc b/paludis/repositories/unpackaged/unpackaged_key.cc
index 9fbb1a1..96c7e7b 100644
--- a/paludis/repositories/unpackaged/unpackaged_key.cc
+++ b/paludis/repositories/unpackaged/unpackaged_key.cc
@@ -175,6 +175,7 @@ UnpackagedChoicesKey::value() const
)));
build_options->add(make_shared_ptr(new ELikeSplitChoiceValue(_imp->id->shared_from_this(), _imp->env, build_options)));
build_options->add(make_shared_ptr(new ELikeStripChoiceValue(_imp->id->shared_from_this(), _imp->env, build_options)));
+ build_options->add(make_shared_ptr(new ELikePreserveWorkChoiceValue(_imp->id->shared_from_this(), _imp->env, build_options)));
_imp->value->add(build_options);
}