aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-11 17:52:54 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-11 17:52:54 +0100
commit7e41c09ced6ed85cf83e2973b85b821255e8da66 (patch)
treef1ece80e0007c41fd0c2f401646001e3c265264a
parent31430fbb0e4a1c1e4a0ebae4fab119f4f3e55355 (diff)
downloadpaludis-7e41c09ced6ed85cf83e2973b85b821255e8da66.tar.gz
paludis-7e41c09ced6ed85cf83e2973b85b821255e8da66.tar.xz
Make old labels explode less nastily
-rw-r--r--paludis/repositories/e/dep_parser.cc9
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf8
2 files changed, 15 insertions, 2 deletions
diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc
index 463a180..0ab3b47 100644
--- a/paludis/repositories/e/dep_parser.cc
+++ b/paludis/repositories/e/dep_parser.cc
@@ -27,6 +27,7 @@
#include <paludis/util/map.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/return_literal_function.hh>
+#include <paludis/util/log.hh>
#include <paludis/elike_dep_parser.hh>
#include <paludis/elike_conditional_dep_spec.hh>
#include <paludis/elike_package_dep_spec.hh>
@@ -678,7 +679,7 @@ paludis::erepository::parse_dependency_label(const std::string & s, const EAPI &
std::set<std::string> labels;
std::string label(s.substr(0, s.length() - 1));
- tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(label, ",+", "", std::inserter(labels, labels.end()));
+ tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(label, "+", "", std::inserter(labels, labels.end()));
std::tr1::shared_ptr<DependenciesLabelsDepSpec> l(new DependenciesLabelsDepSpec);
@@ -706,6 +707,12 @@ paludis::erepository::parse_dependency_label(const std::string & s, const EAPI &
l->add_label(make_shared_ptr(new DependenciesRecommendationLabel(*it, return_literal_function(true))));
else if (c == "DependenciesTestLabel")
l->add_label(make_shared_ptr(new DependenciesTestLabel(*it, return_literal_function(true))));
+ else if (c == "WarnAndIgnore")
+ {
+ Log::get_instance()->message("e.dep_parser.obsolete_label", ll_warning, lc_no_context)
+ << "Label '" << *it << "' no longer exists, pretending it's a build label instead";
+ l->add_label(make_shared_ptr(new DependenciesBuildLabel(*it, return_literal_function(true))));
+ }
else
throw EDepParseError(s, "Label '" + *it + "' maps to unknown class '" + c + "'");
}
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index 8ae50ed..bb98350 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -307,7 +307,13 @@ dependency_labels = \
recommendation = DependenciesRecommendationLabel ; \
suggestion = DependenciesSuggestionLabel ; \
test = DependenciesTestLabel ; \
- test-expensive = DependenciesTestLabel
+ test-expensive = DependenciesTestLabel ; \
+ host = WarnAndIgnore ; \
+ target = WarnAndIgnore ; \
+ compile-against = WarnAndIgnore ; \
+ suggested = WarnAndIgnore ; \
+ recommended = WarnAndIgnore ; \
+ required = WarnAndIgnore
restrict_mirror = mirror
restrict_fetch = fetch