aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-07-07 21:42:33 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-07-07 21:42:33 +0100
commit445b4e2cb40981ae78187c86e80a06886ed0ed3b (patch)
tree8ccaf6eaf231a96399a3ebef1ff4a0229e72692d
parent4146c147935b26fa57a0734a13a26909a312ea47 (diff)
downloadpaludis-445b4e2cb40981ae78187c86e80a06886ed0ed3b.tar.gz
paludis-445b4e2cb40981ae78187c86e80a06886ed0ed3b.tar.xz
Framework for merge tracking
Not actually used yet.
-rw-r--r--paludis/action.hh9
-rw-r--r--paludis/ndbam_unmerger.cc1
-rw-r--r--paludis/ndbam_unmerger.hh3
-rw-r--r--paludis/repositories/accounts/accounts_id.cc11
-rw-r--r--paludis/repositories/e/ebuild_entries.cc11
-rw-r--r--paludis/repositories/e/exndbam_repository.cc8
-rw-r--r--paludis/repositories/e/vdb_repository.cc11
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc9
-rw-r--r--paludis/repositories/e/vdb_unmerger.cc1
-rw-r--r--paludis/repositories/e/vdb_unmerger.hh2
-rw-r--r--paludis/repositories/e/vdb_unmerger_TEST.cc6
-rw-r--r--paludis/repositories/unpackaged/installed_id.cc9
-rw-r--r--paludis/repositories/unpackaged/installed_repository_TEST.cc9
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.cc11
-rw-r--r--paludis/repository.hh9
-rw-r--r--paludis/uninstall_task.cc9
-rw-r--r--paludis/unmerger.hh3
-rw-r--r--ruby/action.cc6
18 files changed, 128 insertions, 0 deletions
diff --git a/paludis/action.hh b/paludis/action.hh
index 7472e88..50e19de 100644
--- a/paludis/action.hh
+++ b/paludis/action.hh
@@ -55,6 +55,7 @@ namespace paludis
struct failed_integrity_checks;
struct fetch_unneeded;
struct if_for_install_id;
+ struct ignore_for_unmerge;
struct ignore_unfetched;
struct is_overwrite;
struct make_output_manager;
@@ -123,6 +124,7 @@ namespace paludis
*/
NamedValue<n::make_output_manager, std::tr1::function<std::tr1::shared_ptr<OutputManager> (
const InstallAction &)> > make_output_manager;
+
/**
* Callback to carry out an uninstall, for replacing.
*
@@ -167,6 +169,13 @@ namespace paludis
NamedValue<n::if_for_install_id, std::tr1::shared_ptr<const PackageID> > if_for_install_id;
/**
+ * Sometimes we never want to unmerge certain files.
+ *
+ * \since 0,38
+ */
+ NamedValue<n::ignore_for_unmerge, std::tr1::function<bool (const FSEntry &)> > ignore_for_unmerge;
+
+ /**
* Some repositories need to do special handlings for direct overwrites
* (foo-1.2 replacing foo-1.2). Clients should set this to false.
*
diff --git a/paludis/ndbam_unmerger.cc b/paludis/ndbam_unmerger.cc
index 376838d..54776e9 100644
--- a/paludis/ndbam_unmerger.cc
+++ b/paludis/ndbam_unmerger.cc
@@ -71,6 +71,7 @@ namespace paludis
NDBAMUnmerger::NDBAMUnmerger(const NDBAMUnmergerOptions & o) :
Unmerger(make_named_values<UnmergerOptions>(
value_for<n::environment>(o.environment()),
+ value_for<n::ignore>(o.ignore()),
value_for<n::root>(o.root())
)),
PrivateImplementationPattern<NDBAMUnmerger>(new Implementation<NDBAMUnmerger>(o)),
diff --git a/paludis/ndbam_unmerger.hh b/paludis/ndbam_unmerger.hh
index dc7014c..474126f 100644
--- a/paludis/ndbam_unmerger.hh
+++ b/paludis/ndbam_unmerger.hh
@@ -27,6 +27,7 @@
#include <paludis/unmerger.hh>
#include <paludis/environment-fwd.hh>
#include <paludis/package_id-fwd.hh>
+#include <tr1/functional>
namespace paludis
{
@@ -36,6 +37,7 @@ namespace paludis
struct config_protect_mask;
struct contents_file;
struct environment;
+ struct ignore;
struct ndbam;
struct output_manager;
struct package_id;
@@ -50,6 +52,7 @@ namespace paludis
NamedValue<n::config_protect_mask, std::string> config_protect_mask;
NamedValue<n::contents_file, FSEntry> contents_file;
NamedValue<n::environment, const Environment *> environment;
+ NamedValue<n::ignore, const std::tr1::function<bool (const FSEntry &)> > ignore;
NamedValue<n::ndbam, const NDBAM *> ndbam;
NamedValue<n::output_manager, std::tr1::shared_ptr<OutputManager> > output_manager;
NamedValue<n::package_id, std::tr1::shared_ptr<const PackageID> > package_id;
diff --git a/paludis/repositories/accounts/accounts_id.cc b/paludis/repositories/accounts/accounts_id.cc
index 38fe0ed..a07f270 100644
--- a/paludis/repositories/accounts/accounts_id.cc
+++ b/paludis/repositories/accounts/accounts_id.cc
@@ -440,6 +440,15 @@ namespace
{
s = v;
}
+
+ bool ignore_nothing(const FSEntry &)
+ {
+ return false;
+ }
+
+ void installed_this(const FSEntry &)
+ {
+ }
}
void
@@ -467,6 +476,7 @@ AccountsID::perform_action(Action & action) const
make_named_values<MergeParams>(
value_for<n::environment_file>(FSEntry("/dev/null")),
value_for<n::image_dir>(fs_location_key()->value()),
+ value_for<n::installed_this>(&installed_this),
value_for<n::options>(MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs),
value_for<n::output_manager>(output_manager),
value_for<n::package_id>(shared_from_this()),
@@ -499,6 +509,7 @@ AccountsID::perform_action(Action & action) const
UninstallActionOptions uo(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(used_config_protect),
value_for<n::if_for_install_id>(shared_from_this()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, output_manager, std::tr1::placeholders::_1))
));
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index 9e45e91..a0632e0 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -554,6 +554,15 @@ namespace
{
return o;
}
+
+ void installed_this(const FSEntry &)
+ {
+ }
+
+ bool ignore_nothing(const FSEntry &)
+ {
+ return false;
+ }
}
void
@@ -707,6 +716,7 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
make_named_values<MergeParams>(
value_for<n::environment_file>(package_builddir / "temp" / "loadsaveenv"),
value_for<n::image_dir>(package_builddir / "image"),
+ value_for<n::installed_this>(&installed_this),
value_for<n::options>(id->eapi()->supported()->merger_options()),
value_for<n::output_manager>(output_manager),
value_for<n::package_id>(id),
@@ -839,6 +849,7 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
UninstallActionOptions uo(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(used_config_protect),
value_for<n::if_for_install_id>(id),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, output_manager, std::tr1::placeholders::_1))
));
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index d6b0c4f..6c5489c 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -314,6 +314,11 @@ namespace
{
return o;
}
+
+ bool ignore_nothing(const FSEntry &)
+ {
+ return false;
+ }
}
void
@@ -428,6 +433,7 @@ ExndbamRepository::merge(const MergeParams & m)
UninstallActionOptions uo(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(config_protect),
value_for<n::if_for_install_id>(m.package_id()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(true),
value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, m.output_manager(), std::tr1::placeholders::_1))
));
@@ -447,6 +453,7 @@ ExndbamRepository::merge(const MergeParams & m)
UninstallActionOptions uo(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(config_protect),
value_for<n::if_for_install_id>(m.package_id()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, m.output_manager(), std::tr1::placeholders::_1))
));
@@ -527,6 +534,7 @@ ExndbamRepository::perform_uninstall(
value_for<n::config_protect_mask>(config_protect_mask),
value_for<n::contents_file>(ver_dir / "contents"),
value_for<n::environment>(_imp->params.environment()),
+ value_for<n::ignore>(&ignore_nothing),
value_for<n::ndbam>(&_imp->ndbam),
value_for<n::output_manager>(output_manager),
value_for<n::package_id>(id),
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index b3166b4..1d4eaed 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -383,6 +383,14 @@ VDBRepositoryKeyReadError::VDBRepositoryKeyReadError(
{
}
+namespace
+{
+ bool ignore_nothing(const FSEntry &)
+ {
+ return false;
+ }
+}
+
void
VDBRepository::perform_uninstall(
const std::tr1::shared_ptr<const ERepositoryID> & id,
@@ -450,6 +458,7 @@ VDBRepository::perform_uninstall(
value_for<n::config_protect>(final_config_protect),
value_for<n::config_protect_mask>(config_protect_mask),
value_for<n::environment>(_imp->params.environment()),
+ value_for<n::ignore>(&ignore_nothing),
value_for<n::output_manager>(output_manager),
value_for<n::package_id>(id),
value_for<n::root>(installed_root_key()->value())
@@ -964,6 +973,7 @@ VDBRepository::merge(const MergeParams & m)
UninstallActionOptions uo(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(config_protect),
value_for<n::if_for_install_id>(m.package_id()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(true),
value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, m.output_manager(), std::tr1::placeholders::_1))
));
@@ -983,6 +993,7 @@ VDBRepository::merge(const MergeParams & m)
UninstallActionOptions uo(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(config_protect),
value_for<n::if_for_install_id>(m.package_id()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, m.output_manager(), std::tr1::placeholders::_1))
));
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index 9a03b32..ce47687 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -76,6 +76,11 @@ namespace
{
return wp_yes;
}
+
+ bool ignore_nothing(const FSEntry &)
+ {
+ return false;
+ }
}
namespace test_cases
@@ -354,6 +359,7 @@ namespace test_cases
UninstallAction uninstall_action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
value_for<n::if_for_install_id>(make_null_shared_ptr()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));
@@ -483,6 +489,7 @@ namespace test_cases
UninstallAction uninstall_action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
value_for<n::if_for_install_id>(make_null_shared_ptr()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));
@@ -626,6 +633,7 @@ namespace test_cases
UninstallAction uninstall_action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
value_for<n::if_for_install_id>(make_null_shared_ptr()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));
@@ -1004,6 +1012,7 @@ namespace test_cases
UninstallAction uninstall_action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
value_for<n::if_for_install_id>(make_null_shared_ptr()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));
diff --git a/paludis/repositories/e/vdb_unmerger.cc b/paludis/repositories/e/vdb_unmerger.cc
index 9e4c134..6d35b68 100644
--- a/paludis/repositories/e/vdb_unmerger.cc
+++ b/paludis/repositories/e/vdb_unmerger.cc
@@ -70,6 +70,7 @@ namespace paludis
VDBUnmerger::VDBUnmerger(const VDBUnmergerOptions & o) :
Unmerger(make_named_values<UnmergerOptions>(
value_for<n::environment>(o.environment()),
+ value_for<n::ignore>(o.ignore()),
value_for<n::root>(o.root())
)),
PrivateImplementationPattern<VDBUnmerger>(new Implementation<VDBUnmerger>(o)),
diff --git a/paludis/repositories/e/vdb_unmerger.hh b/paludis/repositories/e/vdb_unmerger.hh
index 858ced5..bf9beb1 100644
--- a/paludis/repositories/e/vdb_unmerger.hh
+++ b/paludis/repositories/e/vdb_unmerger.hh
@@ -35,6 +35,7 @@ namespace paludis
struct config_protect;
struct config_protect_mask;
struct environment;
+ struct ignore;
struct output_manager;
struct package_id;
struct root;
@@ -52,6 +53,7 @@ namespace paludis
NamedValue<n::config_protect, std::string> config_protect;
NamedValue<n::config_protect_mask, std::string> config_protect_mask;
NamedValue<n::environment, Environment *> environment;
+ NamedValue<n::ignore, const std::tr1::function<bool (const FSEntry &)> > ignore;
NamedValue<n::output_manager, std::tr1::shared_ptr<OutputManager> > output_manager;
NamedValue<n::package_id, std::tr1::shared_ptr<const PackageID> > package_id;
NamedValue<n::root, FSEntry> root;
diff --git a/paludis/repositories/e/vdb_unmerger_TEST.cc b/paludis/repositories/e/vdb_unmerger_TEST.cc
index dd360a8..b3ff6a4 100644
--- a/paludis/repositories/e/vdb_unmerger_TEST.cc
+++ b/paludis/repositories/e/vdb_unmerger_TEST.cc
@@ -52,6 +52,11 @@ namespace
return mm->second;
}
+ bool ignore_nothing(const FSEntry &)
+ {
+ return false;
+ }
+
class VDBUnmergerNoDisplay :
public VDBUnmerger
{
@@ -121,6 +126,7 @@ namespace
value_for<n::config_protect>("/protected_file /protected_dir"),
value_for<n::config_protect_mask>("/protected_dir/unprotected_file /protected_dir/unprotected_dir"),
value_for<n::environment>(&env),
+ value_for<n::ignore>(&ignore_nothing),
value_for<n::output_manager>(make_shared_ptr(new StandardOutputManager)),
value_for<n::package_id>(*env[selection::RequireExactlyOne(generator::Matches(
parse_user_package_dep_spec("cat/" + fix(what), &env, UserPackageDepSpecOptions()),
diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc
index 52ab32a..93b4547 100644
--- a/paludis/repositories/unpackaged/installed_id.cc
+++ b/paludis/repositories/unpackaged/installed_id.cc
@@ -819,6 +819,14 @@ InstalledUnpackagedID::extra_hash_value() const
return Hash<SlotName>()(slot_key()->value());
}
+namespace
+{
+ bool ignore_nothing(const FSEntry &)
+ {
+ return false;
+ }
+}
+
void
InstalledUnpackagedID::uninstall(const bool replace, const std::tr1::shared_ptr<OutputManager> & output_manager) const
{
@@ -849,6 +857,7 @@ InstalledUnpackagedID::uninstall(const bool replace, const std::tr1::shared_ptr<
value_for<n::config_protect_mask>(getenv_with_default("CONFIG_PROTECT_MASK", "")),
value_for<n::contents_file>(ver_dir / "contents"),
value_for<n::environment>(_imp->env),
+ value_for<n::ignore>(&ignore_nothing),
value_for<n::ndbam>(_imp->ndbam),
value_for<n::output_manager>(output_manager),
value_for<n::package_id>(shared_from_this()),
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc
index 59de60f..40bcf39 100644
--- a/paludis/repositories/unpackaged/installed_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc
@@ -84,6 +84,11 @@ namespace
{
return wp_yes;
}
+
+ bool ignore_nothing(const FSEntry &)
+ {
+ return false;
+ }
}
namespace test_cases
@@ -263,6 +268,7 @@ namespace test_cases
UninstallAction action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
value_for<n::if_for_install_id>(make_null_shared_ptr()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));
@@ -317,6 +323,7 @@ namespace test_cases
UninstallAction action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
value_for<n::if_for_install_id>(make_null_shared_ptr()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));
@@ -564,6 +571,7 @@ namespace test_cases
UninstallAction action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
value_for<n::if_for_install_id>(make_null_shared_ptr()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));
@@ -609,6 +617,7 @@ namespace test_cases
UninstallAction action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
value_for<n::if_for_install_id>(make_null_shared_ptr()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));
diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc
index 4e2816e..e256213 100644
--- a/paludis/repositories/unpackaged/unpackaged_id.cc
+++ b/paludis/repositories/unpackaged/unpackaged_id.cc
@@ -313,6 +313,15 @@ namespace
{
return o;
}
+
+ void installed_this(const FSEntry &)
+ {
+ }
+
+ bool ignore_nothing(const FSEntry &)
+ {
+ return false;
+ }
}
void
@@ -383,6 +392,7 @@ UnpackagedID::perform_action(Action & action) const
make_named_values<MergeParams>(
value_for<n::environment_file>(FSEntry("/dev/null")),
value_for<n::image_dir>(fs_location_key()->value()),
+ value_for<n::installed_this>(&installed_this),
value_for<n::options>(MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs),
value_for<n::output_manager>(output_manager),
value_for<n::package_id>(shared_from_this()),
@@ -413,6 +423,7 @@ UnpackagedID::perform_action(Action & action) const
UninstallActionOptions uo(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(used_config_protect),
value_for<n::if_for_install_id>(shared_from_this()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(std::tr1::bind(&this_output_manager, output_manager, std::tr1::placeholders::_1))
));
diff --git a/paludis/repository.hh b/paludis/repository.hh
index f415676..7d873e0 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -62,6 +62,7 @@ namespace paludis
struct environment_variable_interface;
struct hook_interface;
struct image_dir;
+ struct installed_this;
struct make_virtuals_interface;
struct manifest_interface;
struct mirrors_interface;
@@ -161,6 +162,14 @@ namespace paludis
{
NamedValue<n::environment_file, FSEntry> environment_file;
NamedValue<n::image_dir, FSEntry> image_dir;
+
+ /**
+ * Some callers need to know what we merged.
+ *
+ * \since 0.38
+ */
+ NamedValue<n::installed_this, std::tr1::function<void (const FSEntry &)> > installed_this;
+
NamedValue<n::options, MergerOptions> options;
NamedValue<n::output_manager, std::tr1::shared_ptr<OutputManager> > output_manager;
NamedValue<n::package_id, std::tr1::shared_ptr<const PackageID> > package_id;
diff --git a/paludis/uninstall_task.cc b/paludis/uninstall_task.cc
index 7105a92..393ad7d 100644
--- a/paludis/uninstall_task.cc
+++ b/paludis/uninstall_task.cc
@@ -222,6 +222,14 @@ UninstallTask::add_unused()
throw InternalError(PALUDIS_HERE, "Trying to mix unused and normal targets?");
}
+namespace
+{
+ bool ignore_nothing(const FSEntry &)
+ {
+ return false;
+ }
+}
+
void
UninstallTask::execute()
{
@@ -370,6 +378,7 @@ UninstallTask::execute()
make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
value_for<n::if_for_install_id>(make_null_shared_ptr()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(std::tr1::ref(output_manager_holder))
));
diff --git a/paludis/unmerger.hh b/paludis/unmerger.hh
index 4053b8e..8e21ea7 100644
--- a/paludis/unmerger.hh
+++ b/paludis/unmerger.hh
@@ -27,6 +27,7 @@
#include <paludis/util/named_value.hh>
#include <paludis/merger_entry_type.hh>
#include <paludis/contents-fwd.hh>
+#include <tr1/functional>
/** \file
* Declarations for the Unmerger class, which can be used by Repository
@@ -47,6 +48,7 @@ namespace paludis
namespace n
{
struct environment;
+ struct ignore;
struct root;
}
@@ -60,6 +62,7 @@ namespace paludis
struct UnmergerOptions
{
NamedValue<n::environment, const Environment *> environment;
+ NamedValue<n::ignore, const std::tr1::function<bool (const FSEntry &)> > ignore;
NamedValue<n::root, FSEntry> root;
};
diff --git a/ruby/action.cc b/ruby/action.cc
index 700291c..92ab7d4 100644
--- a/ruby/action.cc
+++ b/ruby/action.cc
@@ -609,6 +609,11 @@ namespace
return install_action_options_to_value(std::tr1::static_pointer_cast<InstallAction>(*p)->options);
}
+ bool ignore_nothing(const FSEntry &)
+ {
+ return false;
+ }
+
/*
* call-seq:
* UninstallActionOptions.new(config_protect) -> UninstallActionOptions
@@ -633,6 +638,7 @@ namespace
ptr = new UninstallActionOptions(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(v_config_protect),
value_for<n::if_for_install_id>(make_null_shared_ptr()),
+ value_for<n::ignore_for_unmerge>(&ignore_nothing),
value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));