aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-14 19:28:18 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-14 19:28:18 +0100
commit6945cb45acb4f215f347cc0bbc7a55d10ea054b1 (patch)
tree689c5c44aa862ba52ced033e0fd6c812d58a171b /paludis/repositories
parent4a87c6e9793486c94d9123110b12bd0c51bdd15e (diff)
downloadpaludis-6945cb45acb4f215f347cc0bbc7a55d10ea054b1.tar.gz
paludis-6945cb45acb4f215f347cc0bbc7a55d10ea054b1.tar.xz
Hooks don't need an interface.
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/accounts/accounts_repository.cc9
-rw-r--r--paludis/repositories/accounts/accounts_repository.hh2
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc8
-rw-r--r--paludis/repositories/cran/cran_installed_repository.hh1
-rw-r--r--paludis/repositories/cran/cran_repository.cc8
-rw-r--r--paludis/repositories/cran/cran_repository.hh2
-rw-r--r--paludis/repositories/e/e_installed_repository.hh9
-rw-r--r--paludis/repositories/e/e_repository.cc1
-rw-r--r--paludis/repositories/e/e_repository.hh1
-rw-r--r--paludis/repositories/e/exndbam_repository.cc1
-rw-r--r--paludis/repositories/e/vdb_repository.cc1
-rw-r--r--paludis/repositories/fake/fake_installed_repository.cc1
-rw-r--r--paludis/repositories/fake/fake_repository.cc2
-rw-r--r--paludis/repositories/fake/fake_repository.hh2
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc8
-rw-r--r--paludis/repositories/fake/fake_repository_base.hh2
-rw-r--r--paludis/repositories/gems/gems_repository.cc9
-rw-r--r--paludis/repositories/gems/gems_repository.hh2
-rw-r--r--paludis/repositories/gems/installed_gems_repository.cc9
-rw-r--r--paludis/repositories/gems/installed_gems_repository.hh3
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.cc8
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.hh2
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc9
-rw-r--r--paludis/repositories/unpackaged/installed_repository.hh3
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.cc9
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.hh3
-rw-r--r--paludis/repositories/unwritten/unwritten_repository.cc8
-rw-r--r--paludis/repositories/unwritten/unwritten_repository.hh2
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc1
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.hh1
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc9
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.hh3
32 files changed, 112 insertions, 27 deletions
diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc
index b0e6a6ea5..d8d866296 100644
--- a/paludis/repositories/accounts/accounts_repository.cc
+++ b/paludis/repositories/accounts/accounts_repository.cc
@@ -38,6 +38,7 @@
#include <paludis/generator.hh>
#include <paludis/selection.hh>
#include <paludis/filtered_generator.hh>
+#include <paludis/hook.hh>
using namespace paludis;
using namespace paludis::accounts_repository;
@@ -112,7 +113,6 @@ AccountsRepository::AccountsRepository(const AccountsRepositoryParams & p) :
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
@@ -135,7 +135,6 @@ AccountsRepository::AccountsRepository(const InstalledAccountsRepositoryParams &
value_for<n::destination_interface>(this),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
@@ -460,5 +459,11 @@ AccountsRepository::populate_sets() const
}
}
+HookResult
+AccountsRepository::perform_hook(const Hook &) const
+{
+ return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
+}
+
template class PrivateImplementationPattern<AccountsRepository>;
diff --git a/paludis/repositories/accounts/accounts_repository.hh b/paludis/repositories/accounts/accounts_repository.hh
index c9d2d22bb..e3c80675d 100644
--- a/paludis/repositories/accounts/accounts_repository.hh
+++ b/paludis/repositories/accounts/accounts_repository.hh
@@ -138,6 +138,8 @@ namespace paludis
virtual void invalidate_masks();
virtual void regenerate_cache() const;
+ virtual HookResult perform_hook(const Hook & hook) const;
+
///\}
///\name Destination functions
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index 587f6edaf..5f94c03e5 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -31,6 +31,7 @@
#include <paludis/filtered_generator.hh>
#include <paludis/filter.hh>
#include <paludis/selection.hh>
+#include <paludis/hook.hh>
#include <paludis/repositories/cran/cran_package_id.hh>
#include <paludis/repositories/cran/cran_dep_parser.hh>
#include <paludis/repositories/cran/cran_installed_repository.hh>
@@ -165,7 +166,6 @@ CRANInstalledRepository::CRANInstalledRepository(const CRANInstalledRepositoryPa
value_for<n::destination_interface>(this),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
@@ -597,3 +597,9 @@ CRANInstalledRepository::populate_sets() const
true);
}
+HookResult
+CRANInstalledRepository::perform_hook(const Hook &) const
+{
+ return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
+}
+
diff --git a/paludis/repositories/cran/cran_installed_repository.hh b/paludis/repositories/cran/cran_installed_repository.hh
index bba001961..79c6492ea 100644
--- a/paludis/repositories/cran/cran_installed_repository.hh
+++ b/paludis/repositories/cran/cran_installed_repository.hh
@@ -106,6 +106,7 @@ namespace paludis
virtual void invalidate();
virtual void invalidate_masks();
+ virtual HookResult perform_hook(const Hook & hook) const;
/* RepositoryDestinationInterface */
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index f2dfd5312..762b649dc 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -48,6 +48,7 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/output_manager.hh>
#include <paludis/syncer.hh>
+#include <paludis/hook.hh>
#include <tr1/unordered_map>
#include <tr1/functional>
#include <functional>
@@ -110,7 +111,6 @@ CRANRepository::CRANRepository(const CRANRepositoryParams & p) :
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
@@ -545,3 +545,9 @@ CRANRepository::populate_sets() const
{
}
+HookResult
+CRANRepository::perform_hook(const Hook &) const
+{
+ return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
+}
+
diff --git a/paludis/repositories/cran/cran_repository.hh b/paludis/repositories/cran/cran_repository.hh
index bbd5578ee..a836690fe 100644
--- a/paludis/repositories/cran/cran_repository.hh
+++ b/paludis/repositories/cran/cran_repository.hh
@@ -162,6 +162,8 @@ namespace paludis
virtual void populate_sets() const;
///\}
+
+ virtual HookResult perform_hook(const Hook & hook) const;
};
/**
diff --git a/paludis/repositories/e/e_installed_repository.hh b/paludis/repositories/e/e_installed_repository.hh
index 4b9660c78..76427b09d 100644
--- a/paludis/repositories/e/e_installed_repository.hh
+++ b/paludis/repositories/e/e_installed_repository.hh
@@ -45,7 +45,6 @@ namespace paludis
public Repository,
public RepositoryEnvironmentVariableInterface,
public RepositoryDestinationInterface,
- public RepositoryHookInterface,
private PrivateImplementationPattern<EInstalledRepository>
{
private:
@@ -74,17 +73,15 @@ namespace paludis
virtual bool want_pre_post_phases() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- /* RepositoryHookInterface */
-
- virtual HookResult perform_hook(const Hook & hook) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
/* Repository */
virtual std::tr1::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const;
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
+ virtual HookResult perform_hook(const Hook & hook) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
///\name For use by EInstalledRepositoryID
///\{
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 3a262e7e0..146a562b4 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -499,7 +499,6 @@ ERepository::ERepository(const ERepositoryParams & p) :
value_for<n::destination_interface>(p.binary_destination() ? this : 0),
value_for<n::e_interface>(this),
value_for<n::environment_variable_interface>(this),
- value_for<n::hook_interface>(this),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(this),
value_for<n::mirrors_interface>(this),
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index 4a5981f09..39951f42e 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_repository.hh
@@ -57,7 +57,6 @@ namespace paludis
public RepositoryVirtualsInterface,
public RepositoryDestinationInterface,
public RepositoryEInterface,
- public RepositoryHookInterface,
public RepositoryQAInterface,
public RepositoryManifestInterface,
public std::tr1::enable_shared_from_this<ERepository>,
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 382e7dc7a..f5181fc90 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -106,7 +106,6 @@ ExndbamRepository::ExndbamRepository(const RepositoryName & n, const ExndbamRepo
value_for<n::destination_interface>(this),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(this),
- value_for<n::hook_interface>(this),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 2cca557c3..f4c47b516 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -161,7 +161,6 @@ VDBRepository::VDBRepository(const VDBRepositoryParams & p) :
value_for<n::destination_interface>(this),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(this),
- value_for<n::hook_interface>(this),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc
index 924362a85..ad8a90f1a 100644
--- a/paludis/repositories/fake/fake_installed_repository.cc
+++ b/paludis/repositories/fake/fake_installed_repository.cc
@@ -62,7 +62,6 @@ FakeInstalledRepository::FakeInstalledRepository(const Environment * const e, co
value_for<n::destination_interface>(this),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc
index 57d035fe3..4e3849ed1 100644
--- a/paludis/repositories/fake/fake_repository.cc
+++ b/paludis/repositories/fake/fake_repository.cc
@@ -62,7 +62,6 @@ FakeRepository::FakeRepository(const Environment * const env, const RepositoryNa
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(this),
@@ -83,7 +82,6 @@ FakeRepository::FakeRepository(const FakeRepositoryParams & params) :
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(this),
diff --git a/paludis/repositories/fake/fake_repository.hh b/paludis/repositories/fake/fake_repository.hh
index 5e3ced58d..0c269cb50 100644
--- a/paludis/repositories/fake/fake_repository.hh
+++ b/paludis/repositories/fake/fake_repository.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index 51ce3694a..365bd8dc2 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -26,7 +26,9 @@
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/wrapped_output_iterator.hh>
+#include <paludis/util/make_named_values.hh>
#include <paludis/user_dep_spec.hh>
+#include <paludis/hook.hh>
#include <tr1/functional>
#include <map>
#include <algorithm>
@@ -179,3 +181,9 @@ FakeRepositoryBase::populate_sets() const
{
}
+HookResult
+FakeRepositoryBase::perform_hook(const Hook &) const
+{
+ return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
+}
+
diff --git a/paludis/repositories/fake/fake_repository_base.hh b/paludis/repositories/fake/fake_repository_base.hh
index b2548b59b..6613358b3 100644
--- a/paludis/repositories/fake/fake_repository_base.hh
+++ b/paludis/repositories/fake/fake_repository_base.hh
@@ -123,6 +123,8 @@ namespace paludis
virtual void populate_sets() const;
///\}
+
+ virtual HookResult perform_hook(const Hook & hook) const;
};
}
diff --git a/paludis/repositories/gems/gems_repository.cc b/paludis/repositories/gems/gems_repository.cc
index 29e369533..6de2ede09 100644
--- a/paludis/repositories/gems/gems_repository.cc
+++ b/paludis/repositories/gems/gems_repository.cc
@@ -39,6 +39,7 @@
#include <paludis/literal_metadata_key.hh>
#include <paludis/distribution.hh>
#include <paludis/environment.hh>
+#include <paludis/hook.hh>
#include <tr1/unordered_map>
using namespace paludis;
@@ -94,7 +95,6 @@ GemsRepository::GemsRepository(const gems::RepositoryParams & params) :
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
@@ -405,3 +405,10 @@ GemsRepository::populate_sets() const
{
}
+HookResult
+GemsRepository::perform_hook(const Hook &) const
+{
+ return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
+}
+
+
diff --git a/paludis/repositories/gems/gems_repository.hh b/paludis/repositories/gems/gems_repository.hh
index 1d5ac0d27..79fe71c20 100644
--- a/paludis/repositories/gems/gems_repository.hh
+++ b/paludis/repositories/gems/gems_repository.hh
@@ -113,6 +113,8 @@ namespace paludis
virtual void populate_sets() const;
///\}
+
+ virtual HookResult perform_hook(const Hook & hook) const;
};
}
diff --git a/paludis/repositories/gems/installed_gems_repository.cc b/paludis/repositories/gems/installed_gems_repository.cc
index 8c3edf07a..9461342bd 100644
--- a/paludis/repositories/gems/installed_gems_repository.cc
+++ b/paludis/repositories/gems/installed_gems_repository.cc
@@ -45,6 +45,7 @@
#include <paludis/filter.hh>
#include <paludis/filtered_generator.hh>
#include <paludis/selection.hh>
+#include <paludis/hook.hh>
#include <tr1/unordered_map>
using namespace paludis;
@@ -98,7 +99,6 @@ InstalledGemsRepository::InstalledGemsRepository(const gems::InstalledRepository
value_for<n::destination_interface>(this),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
@@ -449,3 +449,10 @@ InstalledGemsRepository::populate_sets() const
true);
}
+HookResult
+InstalledGemsRepository::perform_hook(const Hook &) const
+{
+ return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
+}
+
+
diff --git a/paludis/repositories/gems/installed_gems_repository.hh b/paludis/repositories/gems/installed_gems_repository.hh
index 22a9fc032..49d671d1e 100644
--- a/paludis/repositories/gems/installed_gems_repository.hh
+++ b/paludis/repositories/gems/installed_gems_repository.hh
@@ -128,6 +128,9 @@ namespace paludis
virtual void populate_sets() const;
///\}
+
+ virtual HookResult perform_hook(const Hook & hook) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc
index 96f3c8d51..28cf947c3 100644
--- a/paludis/repositories/unavailable/unavailable_repository.cc
+++ b/paludis/repositories/unavailable/unavailable_repository.cc
@@ -28,6 +28,7 @@
#include <paludis/literal_metadata_key.hh>
#include <paludis/action.hh>
#include <paludis/syncer.hh>
+#include <paludis/hook.hh>
#include <list>
using namespace paludis;
@@ -88,7 +89,6 @@ UnavailableRepository::UnavailableRepository(const UnavailableRepositoryParams &
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
@@ -344,5 +344,11 @@ UnavailableRepository::populate_sets() const
{
}
+HookResult
+UnavailableRepository::perform_hook(const Hook &) const
+{
+ return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
+}
+
template class PrivateImplementationPattern<unavailable_repository::UnavailableRepository>;
diff --git a/paludis/repositories/unavailable/unavailable_repository.hh b/paludis/repositories/unavailable/unavailable_repository.hh
index 657093b73..338a595ef 100644
--- a/paludis/repositories/unavailable/unavailable_repository.hh
+++ b/paludis/repositories/unavailable/unavailable_repository.hh
@@ -117,6 +117,8 @@ namespace paludis
virtual void populate_sets() const;
///\}
+
+ virtual HookResult perform_hook(const Hook & hook) const;
};
}
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index ca0e0cae8..a8718c99c 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -46,6 +46,7 @@
#include <paludis/filtered_generator.hh>
#include <paludis/filter.hh>
#include <paludis/selection.hh>
+#include <paludis/hook.hh>
#include <sstream>
#include <sys/time.h>
@@ -93,7 +94,6 @@ InstalledUnpackagedRepository::InstalledUnpackagedRepository(
value_for<n::destination_interface>(this),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
@@ -511,3 +511,10 @@ InstalledUnpackagedRepository::populate_sets() const
true);
}
+HookResult
+InstalledUnpackagedRepository::perform_hook(const Hook &) const
+{
+ return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
+}
+
+
diff --git a/paludis/repositories/unpackaged/installed_repository.hh b/paludis/repositories/unpackaged/installed_repository.hh
index 1189e8bcd..febe346da 100644
--- a/paludis/repositories/unpackaged/installed_repository.hh
+++ b/paludis/repositories/unpackaged/installed_repository.hh
@@ -131,6 +131,9 @@ namespace paludis
virtual void populate_sets() const;
///\}
+
+ virtual HookResult perform_hook(const Hook & hook) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc
index 05022caae..a0970a9ae 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository.cc
@@ -32,6 +32,7 @@
#include <paludis/action.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/user_dep_spec.hh>
+#include <paludis/hook.hh>
using namespace paludis;
using namespace paludis::unpackaged_repositories;
@@ -98,7 +99,6 @@ UnpackagedRepository::UnpackagedRepository(const RepositoryName & n,
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
@@ -282,3 +282,10 @@ UnpackagedRepository::populate_sets() const
{
}
+HookResult
+UnpackagedRepository::perform_hook(const Hook &) const
+{
+ return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
+}
+
+
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.hh b/paludis/repositories/unpackaged/unpackaged_repository.hh
index 2b6013180..9f886f723 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.hh
+++ b/paludis/repositories/unpackaged/unpackaged_repository.hh
@@ -130,6 +130,9 @@ namespace paludis
virtual void populate_sets() const;
///\}
+
+ virtual HookResult perform_hook(const Hook & hook) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
diff --git a/paludis/repositories/unwritten/unwritten_repository.cc b/paludis/repositories/unwritten/unwritten_repository.cc
index 58022383a..7856e3b7a 100644
--- a/paludis/repositories/unwritten/unwritten_repository.cc
+++ b/paludis/repositories/unwritten/unwritten_repository.cc
@@ -28,6 +28,7 @@
#include <paludis/literal_metadata_key.hh>
#include <paludis/action.hh>
#include <paludis/syncer.hh>
+#include <paludis/hook.hh>
#include <list>
using namespace paludis;
@@ -88,7 +89,6 @@ UnwrittenRepository::UnwrittenRepository(const UnwrittenRepositoryParams & p) :
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
@@ -344,6 +344,12 @@ UnwrittenRepository::populate_sets() const
{
}
+HookResult
+UnwrittenRepository::perform_hook(const Hook &) const
+{
+ return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
+}
+
template class PrivateImplementationPattern<unwritten_repository::UnwrittenRepository>;
diff --git a/paludis/repositories/unwritten/unwritten_repository.hh b/paludis/repositories/unwritten/unwritten_repository.hh
index bcb9a3817..d6efad9c1 100644
--- a/paludis/repositories/unwritten/unwritten_repository.hh
+++ b/paludis/repositories/unwritten/unwritten_repository.hh
@@ -116,6 +116,8 @@ namespace paludis
virtual void populate_sets() const;
///\}
+
+ virtual HookResult perform_hook(const Hook & hook) const;
};
}
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index 3c6441736..dd7b30d6d 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -113,7 +113,6 @@ InstalledVirtualsRepository::InstalledVirtualsRepository(const Environment * con
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(this)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(this),
value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.hh b/paludis/repositories/virtuals/installed_virtuals_repository.hh
index 5a726199f..5cfeaf795 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.hh
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.hh
@@ -34,7 +34,6 @@ namespace paludis
*/
class PALUDIS_VISIBLE InstalledVirtualsRepository :
public Repository,
- public RepositoryHookInterface,
public RepositoryDestinationInterface,
public std::tr1::enable_shared_from_this<InstalledVirtualsRepository>,
private PrivateImplementationPattern<InstalledVirtualsRepository>
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 5dcbaa3df..ced232da4 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -29,6 +29,7 @@
#include <paludis/generator.hh>
#include <paludis/filter.hh>
#include <paludis/filtered_generator.hh>
+#include <paludis/hook.hh>
#include <paludis/util/log.hh>
#include <paludis/util/make_shared_ptr.hh>
@@ -124,7 +125,6 @@ VirtualsRepository::VirtualsRepository(const Environment * const env) :
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
value_for<n::make_virtuals_interface>(this),
value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
@@ -458,3 +458,10 @@ VirtualsRepository::populate_sets() const
{
}
+HookResult
+VirtualsRepository::perform_hook(const Hook &) const
+{
+ return make_named_values<HookResult>(value_for<n::max_exit_status>(0), value_for<n::output>(""));
+}
+
+
diff --git a/paludis/repositories/virtuals/virtuals_repository.hh b/paludis/repositories/virtuals/virtuals_repository.hh
index cf33555f5..175e3ea76 100644
--- a/paludis/repositories/virtuals/virtuals_repository.hh
+++ b/paludis/repositories/virtuals/virtuals_repository.hh
@@ -121,6 +121,9 @@ namespace paludis
virtual void populate_sets() const;
///\}
+
+ virtual HookResult perform_hook(const Hook & hook) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
};
}