diff options
author | 2011-06-12 00:39:59 +0100 | |
---|---|---|
committer | 2011-06-12 00:39:59 +0100 | |
commit | 37c884ee1613e14347d3604e316adae68c4d67b7 (patch) | |
tree | a9956eb529900ffaa0e9e4477eddbc8a585cb24b /paludis | |
parent | 59196401ac1166947914bfef013045335e3355ae (diff) | |
download | paludis-37c884ee1613e14347d3604e316adae68c4d67b7.tar.gz paludis-37c884ee1613e14347d3604e316adae68c4d67b7.tar.xz |
Remove E provides
Diffstat (limited to 'paludis')
-rw-r--r-- | paludis/repositories/e/dep_parser.cc | 46 | ||||
-rw-r--r-- | paludis/repositories/e/dep_parser.hh | 6 | ||||
-rw-r--r-- | paludis/repositories/e/e_installed_repository_id.cc | 9 | ||||
-rw-r--r-- | paludis/repositories/e/e_key.cc | 77 | ||||
-rw-r--r-- | paludis/repositories/e/e_key.hh | 26 |
5 files changed, 0 insertions, 164 deletions
diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc index bab3e7c30..29e068619 100644 --- a/paludis/repositories/e/dep_parser.cc +++ b/paludis/repositories/e/dep_parser.cc @@ -590,52 +590,6 @@ paludis::erepository::parse_commented_set(const std::string & s, const Environme return top; } -std::shared_ptr<ProvideSpecTree> -paludis::erepository::parse_provide(const std::string & s, const Environment * const env, const EAPI & eapi, const bool is_installed) -{ - using namespace std::placeholders; - - ParseStackTypes<ProvideSpecTree>::Stack stack; - std::shared_ptr<AllDepSpec> spec(std::make_shared<AllDepSpec>()); - std::shared_ptr<DepSpec> thing_to_annotate(spec); - std::list<std::shared_ptr<DepSpec> > thing_to_star_annotate; - std::shared_ptr<ProvideSpecTree> top(std::make_shared<ProvideSpecTree>(spec)); - stack.push_front(make_named_values<ParseStackTypes<ProvideSpecTree>::Item>( - n::block_children() = std::list<std::pair<std::shared_ptr<BlockDepSpec>, BlockFixOp> >(), - n::children() = std::list<std::shared_ptr<DepSpec> >(), - n::item() = top->top(), - n::spec() = spec - )); - - ELikeDepParserCallbacks callbacks( - make_named_values<ELikeDepParserCallbacks>( - n::on_all() = std::bind(&any_all_handler<ProvideSpecTree, AllDepSpec>, std::ref(stack)), - n::on_annotations() = std::bind(&apply_annotations, std::cref(eapi), std::ref(thing_to_annotate), std::cref(thing_to_star_annotate), _1), - n::on_any() = std::bind(&any_not_allowed_handler, s), - n::on_arrow() = std::bind(&arrows_not_allowed_handler, s, _1, _2), - n::on_error() = std::bind(&error_handler, s, _1), - n::on_exactly_one() = std::bind(&exactly_one_not_allowed_handler, s), - n::on_label() = std::bind(&labels_not_allowed_handler, s, _1), - n::on_no_annotations() = &do_nothing, - n::on_pop() = std::bind(&pop_handler<ProvideSpecTree>, std::ref(stack), - ParseStackTypes<ProvideSpecTree>::AnnotationsGoHere(std::bind( - &set_thing_to_annotate, std::ref(thing_to_annotate), _1)), - ParseStackTypes<ProvideSpecTree>::StarAnnotationsGoHere(std::bind( - &set_thing_to_star_annotate, std::ref(thing_to_star_annotate), _1)), - s), - n::on_should_be_empty() = std::bind(&should_be_empty_handler<ProvideSpecTree>, std::ref(stack), s), - n::on_string() = std::bind(&package_dep_spec_string_handler<ProvideSpecTree>, std::ref(stack), - ParseStackTypes<ProvideSpecTree>::AnnotationsGoHere(std::bind( - &set_thing_to_annotate, std::ref(thing_to_annotate), _1)), _1, std::cref(eapi)), - n::on_use() = std::bind(&use_handler<ProvideSpecTree>, std::ref(stack), _1, env, std::cref(eapi), is_installed), - n::on_use_under_any() = std::bind(&use_under_any_handler, s, std::cref(eapi)) - )); - - parse_elike_dependencies(s, callbacks, { }); - - return top; -} - std::shared_ptr<FetchableURISpecTree> paludis::erepository::parse_fetchable_uri(const std::string & s, const Environment * const env, const EAPI & eapi, const bool is_installed) { diff --git a/paludis/repositories/e/dep_parser.hh b/paludis/repositories/e/dep_parser.hh index 8c7ed9c43..60ce937b2 100644 --- a/paludis/repositories/e/dep_parser.hh +++ b/paludis/repositories/e/dep_parser.hh @@ -62,12 +62,6 @@ namespace paludis const Environment * const, const EAPI &) PALUDIS_VISIBLE; /** - * Parse a provide heirarchy. - */ - std::shared_ptr<ProvideSpecTree> parse_provide(const std::string & s, - const Environment * const, const EAPI &, const bool is_installed) PALUDIS_VISIBLE; - - /** * Parse a restrict or plain text heirarchy. */ std::shared_ptr<PlainTextSpecTree> parse_plain_text(const std::string & s, diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc index fd7fc25c1..6248e3663 100644 --- a/paludis/repositories/e/e_installed_repository_id.cc +++ b/paludis/repositories/e/e_installed_repository_id.cc @@ -79,7 +79,6 @@ namespace std::shared_ptr<const MetadataCollectionKey<Set<std::string > > > raw_use_expand_hidden; std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > choices; std::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license; - std::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide; std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > dependencies; std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies; std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > run_dependencies; @@ -332,14 +331,6 @@ EInstalledRepositoryID::need_keys_added() const add_metadata_key(_imp->keys->license); } - if (! vars->provide()->name().empty()) - if ((_imp->dir / vars->provide()->name()).stat().exists()) - { - _imp->keys->provide = std::make_shared<EProvideKey>(_imp->environment, vars->provide(), eapi(), - file_contents(_imp->dir / vars->provide()->name()), mkt_internal, is_installed()); - add_metadata_key(_imp->keys->provide); - } - if (! vars->dependencies()->name().empty()) { if ((_imp->dir / vars->dependencies()->name()).stat().exists()) diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc index 046208753..6ae1e2b81 100644 --- a/paludis/repositories/e/e_key.cc +++ b/paludis/repositories/e/e_key.cc @@ -638,83 +638,6 @@ ERequiredUseKey::type() const namespace paludis { template <> - struct Imp<EProvideKey> - { - const Environment * const env; - const std::string string_value; - - const std::shared_ptr<const EAPIMetadataVariable> variable; - const std::shared_ptr<const EAPI> eapi; - const MetadataKeyType type; - const bool is_installed; - - Imp(const Environment * const e, - const std::string & v, - const std::shared_ptr<const EAPIMetadataVariable> & m, - const std::shared_ptr<const EAPI> & p, - const MetadataKeyType t, bool i) : - env(e), - string_value(v), - variable(m), - eapi(p), - type(t), - is_installed(i) - { - } - }; -} - -EProvideKey::EProvideKey( - const Environment * const e, - const std::shared_ptr<const EAPIMetadataVariable> & m, - const std::shared_ptr<const EAPI> & p, - const std::string & v, const MetadataKeyType t, const bool i) : - _imp(e, v, m, p, t, i) -{ -} - -EProvideKey::~EProvideKey() -{ -} - -const std::shared_ptr<const ProvideSpecTree> -EProvideKey::parse_value() const -{ - Context context("When parsing metadata key '" + raw_name() + "':"); - return parse_provide(_imp->string_value, _imp->env, *_imp->eapi, _imp->is_installed); -} - -const std::string -EProvideKey::pretty_print_value( - const PrettyPrinter & pretty_printer, - const PrettyPrintOptions & options) const -{ - SpecTreePrettyPrinter p(pretty_printer, options); - parse_value()->top()->accept(p); - return stringify(p); -} - -const std::string -EProvideKey::raw_name() const -{ - return _imp->variable->name(); -} - -const std::string -EProvideKey::human_name() const -{ - return _imp->variable->description(); -} - -MetadataKeyType -EProvideKey::type() const -{ - return _imp->type; -} - -namespace paludis -{ - template <> struct Imp<EContentsKey> { const FSPath filename; diff --git a/paludis/repositories/e/e_key.hh b/paludis/repositories/e/e_key.hh index b1f781a6f..aa9bf7d59 100644 --- a/paludis/repositories/e/e_key.hh +++ b/paludis/repositories/e/e_key.hh @@ -196,32 +196,6 @@ namespace paludis const PrettyPrintOptions &) const PALUDIS_ATTRIBUTE((warn_unused_result)); }; - class EProvideKey : - public MetadataSpecTreeKey<ProvideSpecTree> - { - private: - Pimp<EProvideKey> _imp; - - public: - EProvideKey(const Environment * const, - const std::shared_ptr<const EAPIMetadataVariable> &, - const std::shared_ptr<const EAPI> &, - const std::string &, const MetadataKeyType, - const bool is_installed); - ~EProvideKey(); - - virtual const std::shared_ptr<const ProvideSpecTree> parse_value() const - PALUDIS_ATTRIBUTE((warn_unused_result)); - - virtual const std::string raw_name() const PALUDIS_ATTRIBUTE((warn_unused_result)); - virtual const std::string human_name() const PALUDIS_ATTRIBUTE((warn_unused_result)); - virtual MetadataKeyType type() const PALUDIS_ATTRIBUTE((warn_unused_result)); - - virtual const std::string pretty_print_value( - const PrettyPrinter &, - const PrettyPrintOptions &) const PALUDIS_ATTRIBUTE((warn_unused_result)); - }; - class ELicenseKey : public MetadataSpecTreeKey<LicenseSpecTree> { |