aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/accounts/registration.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-12 18:33:48 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-12 18:33:48 +0100
commitf6b265538d15fe0d0b3e7906e0a2ffcd98fec4d5 (patch)
tree1b61a86ee5b9eaf13b2fbf2fda1b3c2febc1c471 /paludis/repositories/accounts/registration.cc
parent15792dbb2affa34cb6a9790a53f20ca9a024e72e (diff)
downloadpaludis-f6b265538d15fe0d0b3e7906e0a2ffcd98fec4d5.tar.gz
paludis-f6b265538d15fe0d0b3e7906e0a2ffcd98fec4d5.tar.xz
Don't load repositories from .sos
Diffstat (limited to 'paludis/repositories/accounts/registration.cc')
-rw-r--r--paludis/repositories/accounts/registration.cc48
1 files changed, 28 insertions, 20 deletions
diff --git a/paludis/repositories/accounts/registration.cc b/paludis/repositories/accounts/registration.cc
index 313114510..67d8f4890 100644
--- a/paludis/repositories/accounts/registration.cc
+++ b/paludis/repositories/accounts/registration.cc
@@ -21,6 +21,7 @@
#include <paludis/repositories/accounts/accounts_repository.hh>
#include <paludis/util/set.hh>
#include <paludis/util/destringify.hh>
+#include "config.h"
using namespace paludis;
using namespace paludis::accounts_repository;
@@ -36,29 +37,36 @@ namespace
}
}
-extern "C" void paludis_initialise_repository_so(RepositoryFactory * const factory) PALUDIS_VISIBLE;
-
-void paludis_initialise_repository_so(RepositoryFactory * const factory)
+namespace paludis
{
- std::tr1::shared_ptr<Set<std::string> > accounts_formats(new Set<std::string>);
- accounts_formats->insert("accounts");
+ namespace repository_groups
+ {
+ REPOSITORY_GROUPS_DECLS;
+ }
- factory->add_repository_format(accounts_formats,
- &AccountsRepository::repository_factory_name,
- &generic_importance,
- &AccountsRepository::repository_factory_create,
- &AccountsRepository::repository_factory_dependencies
- );
+ template <>
+ void register_repositories<repository_groups::accounts>(RepositoryFactory * const factory)
+ {
+ std::tr1::shared_ptr<Set<std::string> > accounts_formats(new Set<std::string>);
+ accounts_formats->insert("accounts");
+
+ factory->add_repository_format(accounts_formats,
+ &AccountsRepository::repository_factory_name,
+ &generic_importance,
+ &AccountsRepository::repository_factory_create,
+ &AccountsRepository::repository_factory_dependencies
+ );
- std::tr1::shared_ptr<Set<std::string> > installed_accounts_formats(new Set<std::string>);
- installed_accounts_formats->insert("installed_accounts");
- installed_accounts_formats->insert("installed-accounts");
+ std::tr1::shared_ptr<Set<std::string> > installed_accounts_formats(new Set<std::string>);
+ installed_accounts_formats->insert("installed_accounts");
+ installed_accounts_formats->insert("installed-accounts");
- factory->add_repository_format(installed_accounts_formats,
- &AccountsRepository::repository_factory_installed_name,
- &generic_importance,
- &AccountsRepository::repository_factory_installed_create,
- &AccountsRepository::repository_factory_installed_dependencies
- );
+ factory->add_repository_format(installed_accounts_formats,
+ &AccountsRepository::repository_factory_installed_name,
+ &generic_importance,
+ &AccountsRepository::repository_factory_installed_create,
+ &AccountsRepository::repository_factory_installed_dependencies
+ );
+ }
}