aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-07-14 20:09:37 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-07-14 20:20:48 +0100
commitc23857618921c622d6227ba5e0e88487031ac06c (patch)
tree3921ab661cad52ea72b7499d9782adaca328452f
parent594db2100920c1082b3527aa5f14282bbe659242 (diff)
downloadpaludis-c23857618921c622d6227ba5e0e88487031ac06c.tar.gz
paludis-c23857618921c622d6227ba5e0e88487031ac06c.tar.xz
Make CONFIG_PROTECT etc available for hooks
-rw-r--r--paludis/repositories/e/exndbam_repository.cc14
-rw-r--r--paludis/repositories/e/vdb_repository.cc14
2 files changed, 28 insertions, 0 deletions
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 71a9624..c4e8160 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -413,6 +413,20 @@ ExndbamRepository::merge(const MergeParams & m)
{
}
}
+ else
+ {
+ /* nasty: make CONFIG_PROTECT etc available for hooks */
+ try
+ {
+ config_protect = snoop_variable_from_environment_file(m.environment_file(), "CONFIG_PROTECT");
+ config_protect_mask = snoop_variable_from_environment_file(m.environment_file(), "CONFIG_PROTECT_MASK");
+ }
+ catch (const Exception & e)
+ {
+ Log::get_instance()->message("e.exndbam_repository.config_protect_unfetchable", ll_warning, lc_context)
+ << "Could not load CONFIG_PROTECT for merge checks due to exception '" + e.message() + "' (" + e.what() + ")";
+ }
+ }
bool fix_mtimes(std::static_pointer_cast<const ERepositoryID>(
m.package_id())->eapi()->supported()->ebuild_options()->fix_mtimes());
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 373b7dd..00f734a 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -638,6 +638,20 @@ VDBRepository::merge(const MergeParams & m)
{
}
}
+ else
+ {
+ /* nasty: make CONFIG_PROTECT etc available for hooks */
+ try
+ {
+ config_protect = snoop_variable_from_environment_file(m.environment_file(), "CONFIG_PROTECT");
+ config_protect_mask = snoop_variable_from_environment_file(m.environment_file(), "CONFIG_PROTECT_MASK");
+ }
+ catch (const Exception & e)
+ {
+ Log::get_instance()->message("e.exndbam_repository.config_protect_unfetchable", ll_warning, lc_context)
+ << "Could not load CONFIG_PROTECT for merge checks due to exception '" + e.message() + "' (" + e.what() + ")";
+ }
+ }
FSPath vdb_dir(_imp->params.location());
vdb_dir /= stringify(m.package_id()->name().category());