aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-28 11:39:24 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-28 11:39:24 +0100
commit2afec32e9aff6c84c6181d83b85a20b13bbcfee6 (patch)
treed8728c7f86974a352bca98c9bc61e90195a40dcd
parentce13a6f9defe83fccd8424027ef1e24ca33b8cc2 (diff)
downloadpaludis-2afec32e9aff6c84c6181d83b85a20b13bbcfee6.tar.gz
paludis-2afec32e9aff6c84c6181d83b85a20b13bbcfee6.tar.xz
format=ebuild and format=exheres deprecated
-rw-r--r--paludis/repositories/e/registration.cc23
1 files changed, 21 insertions, 2 deletions
diff --git a/paludis/repositories/e/registration.cc b/paludis/repositories/e/registration.cc
index 166c21d..f05a075 100644
--- a/paludis/repositories/e/registration.cc
+++ b/paludis/repositories/e/registration.cc
@@ -40,6 +40,15 @@ namespace
else
return 1;
}
+
+ std::shared_ptr<Repository> deprecated_create(
+ Environment * const env,
+ const std::function<std::string (const std::string &)> & f)
+ {
+ Log::get_instance()->message("e.format.deprecated", ll_warning, lc_context)
+ << "Format '" << f("format") << "' in '" << f("repo_file") << "' is deprecated, use format='e' instead";
+ return ERepository::repository_factory_create(env, f);
+ }
}
namespace paludis
@@ -55,8 +64,6 @@ namespace paludis
{
std::shared_ptr<Set<std::string> > ebuild_formats(std::make_shared<Set<std::string>>());
ebuild_formats->insert("e");
- ebuild_formats->insert("ebuild");
- ebuild_formats->insert("exheres");
factory->add_repository_format(
ebuild_formats,
@@ -66,6 +73,18 @@ namespace paludis
&ERepository::repository_factory_dependencies
);
+ std::shared_ptr<Set<std::string> > deprecated_ebuild_formats(std::make_shared<Set<std::string>>());
+ deprecated_ebuild_formats->insert("ebuild");
+ deprecated_ebuild_formats->insert("exheres");
+
+ factory->add_repository_format(
+ deprecated_ebuild_formats,
+ &ERepository::repository_factory_name,
+ &generic_importance,
+ &deprecated_create,
+ &ERepository::repository_factory_dependencies
+ );
+
std::shared_ptr<Set<std::string> > vdb_formats(std::make_shared<Set<std::string>>());
vdb_formats->insert("vdb");