aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-16 19:50:48 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-21 21:48:28 +0000
commit47533bc320d045cd7b0d8ab1b32a6d43f1332479 (patch)
treea17dd057782d67500728390dc6f3a310a14114af
parent1bc8f394387bb400c192bb9277e1d6a87b23e72d (diff)
downloadpaludis-47533bc320d045cd7b0d8ab1b32a6d43f1332479.tar.gz
paludis-47533bc320d045cd7b0d8ab1b32a6d43f1332479.tar.xz
Add 'replacing' to install action options
-rw-r--r--paludis/action.hh8
-rw-r--r--paludis/install_task.cc3
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc6
-rw-r--r--paludis/repositories/e/e_repository_TEST_ever.cc1
-rw-r--r--paludis/repositories/e/e_repository_TEST_exlibs.cc1
-rw-r--r--paludis/repositories/e/exndbam_repository_TEST.cc1
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc6
-rw-r--r--paludis/repositories/unpackaged/installed_repository_TEST.cc3
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository_TEST.cc2
-rw-r--r--python/action.cc2
-rw-r--r--ruby/action.cc1
11 files changed, 34 insertions, 0 deletions
diff --git a/paludis/action.hh b/paludis/action.hh
index fd1f436..14b6a5f 100644
--- a/paludis/action.hh
+++ b/paludis/action.hh
@@ -55,6 +55,7 @@ namespace paludis
struct failed_integrity_checks;
struct fetch_unneeded;
struct make_output_manager;
+ struct replacing;
struct requires_manual_fetching;
struct safe_resume;
struct target_file;
@@ -110,6 +111,13 @@ namespace paludis
NamedValue<n::make_output_manager, std::tr1::function<std::tr1::shared_ptr<OutputManager> (
const InstallAction &)> > make_output_manager;
+ /**
+ * We must replace these.
+ *
+ * \since 0.36
+ */
+ NamedValue<n::replacing, std::tr1::shared_ptr<const PackageIDSequence> > replacing;
+
NamedValue<n::used_this_for_config_protect, std::tr1::function<void (const std::string &)> > used_this_for_config_protect;
NamedValue<n::want_phase, std::tr1::function<WantPhase (const std::string &)> > want_phase;
};
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index bd48140..e424eba 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -780,9 +780,12 @@ InstallTask::_one(const DepList::Iterator dep, const int x, const int y, const i
{
output_manager_holder.reset(new OutputManagerFromEnvironment(_imp->env, dep->package_id(), oe_exclusive));
+ std::tr1::shared_ptr<PackageIDSequence> replacing(new PackageIDSequence);
+
InstallActionOptions install_options(make_named_values<InstallActionOptions>(
value_for<n::destination>(dep->destination()),
value_for<n::make_output_manager>(std::tr1::ref(*output_manager_holder)),
+ value_for<n::replacing>(replacing),
value_for<n::used_this_for_config_protect>(std::tr1::bind(
&Implementation<InstallTask>::assign_config_protect,
_imp.get(), std::tr1::placeholders::_1)),
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 2c152c5..64c265e 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -1106,6 +1106,7 @@ namespace test_cases
InstallAction action(make_named_values<InstallActionOptions>(
value_for<n::destination>(installed_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -1362,6 +1363,7 @@ namespace test_cases
InstallAction action(make_named_values<InstallActionOptions>(
value_for<n::destination>(installed_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -1457,6 +1459,7 @@ namespace test_cases
InstallAction action(make_named_values<InstallActionOptions>(
value_for<n::destination>(installed_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -1582,6 +1585,7 @@ namespace test_cases
InstallAction action(make_named_values<InstallActionOptions>(
value_for<n::destination>(installed_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -1788,6 +1792,7 @@ namespace test_cases
InstallAction action(make_named_values<InstallActionOptions>(
value_for<n::destination>(installed_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -2371,6 +2376,7 @@ namespace test_cases
InstallAction action(make_named_values<InstallActionOptions>(
value_for<n::destination>(installed_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
diff --git a/paludis/repositories/e/e_repository_TEST_ever.cc b/paludis/repositories/e/e_repository_TEST_ever.cc
index 8dccca8..a7c6e46 100644
--- a/paludis/repositories/e/e_repository_TEST_ever.cc
+++ b/paludis/repositories/e/e_repository_TEST_ever.cc
@@ -146,6 +146,7 @@ namespace
InstallAction action(make_named_values<InstallActionOptions>(
value_for<n::destination>(installed_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
diff --git a/paludis/repositories/e/e_repository_TEST_exlibs.cc b/paludis/repositories/e/e_repository_TEST_exlibs.cc
index 19e5396..8209c98 100644
--- a/paludis/repositories/e/e_repository_TEST_exlibs.cc
+++ b/paludis/repositories/e/e_repository_TEST_exlibs.cc
@@ -136,6 +136,7 @@ namespace
InstallAction action(make_named_values<InstallActionOptions>(
value_for<n::destination>(installed_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
diff --git a/paludis/repositories/e/exndbam_repository_TEST.cc b/paludis/repositories/e/exndbam_repository_TEST.cc
index 71c81dd..0f8cae9 100644
--- a/paludis/repositories/e/exndbam_repository_TEST.cc
+++ b/paludis/repositories/e/exndbam_repository_TEST.cc
@@ -130,6 +130,7 @@ namespace test_cases
InstallAction install_action(make_named_values<InstallActionOptions>(
value_for<n::destination>(exndbam_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index 3bbec00..f2d7160 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -344,6 +344,7 @@ namespace test_cases
InstallAction install_action(make_named_values<InstallActionOptions>(
value_for<n::destination>(vdb_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -470,6 +471,7 @@ namespace test_cases
InstallAction install_action(make_named_values<InstallActionOptions>(
value_for<n::destination>(vdb_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -596,6 +598,7 @@ namespace test_cases
InstallAction install_action(make_named_values<InstallActionOptions>(
value_for<n::destination>(vdb_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -994,6 +997,7 @@ namespace test_cases
InstallAction install_action(make_named_values<InstallActionOptions>(
value_for<n::destination>(vdb_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -1233,6 +1237,7 @@ namespace test_cases
InstallAction install_action(make_named_values<InstallActionOptions>(
value_for<n::destination>(vdb_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -1325,6 +1330,7 @@ namespace test_cases
InstallAction install_action(make_named_values<InstallActionOptions>(
value_for<n::destination>(vdb_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc
index fdec71a..2c33132 100644
--- a/paludis/repositories/unpackaged/installed_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc
@@ -397,6 +397,7 @@ namespace test_cases
InstallAction action(make_named_values<InstallActionOptions>(
value_for<n::destination>(repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -453,6 +454,7 @@ namespace test_cases
InstallAction action(make_named_values<InstallActionOptions>(
value_for<n::destination>(repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -512,6 +514,7 @@ namespace test_cases
InstallAction action(make_named_values<InstallActionOptions>(
value_for<n::destination>(repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
diff --git a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
index c5c02cd..6e8e5ee 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
@@ -237,6 +237,7 @@ namespace test_cases
InstallAction action(make_named_values<InstallActionOptions>(
value_for<n::destination>(installed_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -292,6 +293,7 @@ namespace test_cases
InstallAction action(make_named_values<InstallActionOptions>(
value_for<n::destination>(installed_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
diff --git a/python/action.cc b/python/action.cc
index d84166a..ceedafb 100644
--- a/python/action.cc
+++ b/python/action.cc
@@ -23,6 +23,7 @@
#include <paludis/action.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/make_shared_ptr.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/standard_output_manager.hh>
#include <paludis/repository.hh>
#include <tr1/memory>
@@ -71,6 +72,7 @@ namespace
return new InstallActionOptions(make_named_values<InstallActionOptions>(
value_for<n::destination>(r),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
diff --git a/ruby/action.cc b/ruby/action.cc
index f058ffb..1c16f13 100644
--- a/ruby/action.cc
+++ b/ruby/action.cc
@@ -547,6 +547,7 @@ namespace
ptr = new InstallActionOptions(make_named_values<InstallActionOptions>(
value_for<n::destination>(v_destination),
value_for<n::make_output_manager>(&make_standard_output_manager),
+ value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));