aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-11 23:03:46 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-11 23:18:38 +0100
commit9c2ee6d96bbe00dd0b77d652613c7ad5a8dea846 (patch)
treef03dc4fc9792374ed50054662085f9b727818e99
parentccc47c05bfe445c83080b4a6b8eef01a291de5a2 (diff)
downloadpaludis-9c2ee6d96bbe00dd0b77d652613c7ad5a8dea846.tar.gz
paludis-9c2ee6d96bbe00dd0b77d652613c7ad5a8dea846.tar.xz
Deprecation notice for virtuals
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc4
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc5
2 files changed, 8 insertions, 1 deletions
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index e0be2b6..e4c2c52 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -35,6 +35,7 @@
#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/stringify.hh>
+#include <paludis/util/log.hh>
#include <functional>
#include <unordered_map>
@@ -217,6 +218,9 @@ InstalledVirtualsRepository::repository_factory_create(
if (f("root").empty())
throw ConfigurationError("Key 'root' unspecified or empty");
+ Log::get_instance()->message("installed_virtuals.deprecated", ll_warning, lc_no_context)
+ << "Old-style virtuals no longer exist. You should remove " << f("repo_file");
+
return std::make_shared<InstalledVirtualsRepository>(env, FSPath(f("root")));
}
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 5d432f1..0341d4e 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -177,8 +177,11 @@ VirtualsRepository::repository_factory_name(
std::shared_ptr<Repository>
VirtualsRepository::repository_factory_create(
const Environment * const env,
- const std::function<std::string (const std::string &)> &)
+ const std::function<std::string (const std::string &)> & f)
{
+ Log::get_instance()->message("virtuals.deprecated", ll_warning, lc_no_context)
+ << "Old-style virtuals no longer exist. You should remove " << f("repo_file");
+
return std::make_shared<VirtualsRepository>(env);
}