aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-09 18:12:57 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-11 17:16:30 +0100
commita99f46ae26d0679ec1b815faf33787686b071000 (patch)
treed1512aeac2027a80c77f0c5f56dad84e06db5e96
parentc84fb95a15d9b9b96a2e36509391fe6444cc69a0 (diff)
downloadpaludis-a99f46ae26d0679ec1b815faf33787686b071000.tar.gz
paludis-a99f46ae26d0679ec1b815faf33787686b071000.tar.xz
labels changes
-rw-r--r--doc/api/cplusplus/examples/example_formatter.cc4
-rw-r--r--paludis/dep_label-fwd.hh169
-rw-r--r--paludis/dep_label.cc312
-rw-r--r--paludis/dep_label.hh222
-rw-r--r--paludis/dep_list.cc69
-rw-r--r--paludis/dep_spec-fwd.hh12
-rw-r--r--paludis/dep_spec.cc14
-rw-r--r--paludis/dep_spec.hh2
-rw-r--r--paludis/install_task.cc4
-rw-r--r--paludis/metadata_key.hh4
-rw-r--r--paludis/query_visitor.cc2
-rw-r--r--paludis/query_visitor.hh4
-rw-r--r--paludis/range_rewriter.cc2
-rw-r--r--paludis/range_rewriter.hh4
-rw-r--r--paludis/repositories/accounts/accounts_dep_key.cc10
-rw-r--r--paludis/repositories/accounts/accounts_dep_key.hh2
-rw-r--r--paludis/repositories/cran/cran_package_id.cc22
-rw-r--r--paludis/repositories/cran/dep_spec_pretty_printer.cc2
-rw-r--r--paludis/repositories/cran/dep_spec_pretty_printer.hh4
-rw-r--r--paludis/repositories/cran/keys.cc8
-rw-r--r--paludis/repositories/cran/keys.hh4
-rw-r--r--paludis/repositories/e/dep_parser.cc50
-rw-r--r--paludis/repositories/e/dep_parser.hh4
-rw-r--r--paludis/repositories/e/dep_spec_pretty_printer.cc6
-rw-r--r--paludis/repositories/e/dep_spec_pretty_printer.hh4
-rw-r--r--paludis/repositories/e/dependencies_rewriter.cc53
-rw-r--r--paludis/repositories/e/dependencies_rewriter.hh4
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc26
-rw-r--r--paludis/repositories/e/e_key.cc8
-rw-r--r--paludis/repositories/e/e_key.hh4
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc6
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_setup.sh2
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf19
-rw-r--r--paludis/repositories/e/eapis/kdebuild-1.conf4
-rw-r--r--paludis/repositories/e/ebuild_id.cc26
-rw-r--r--paludis/repositories/e/fix_locked_dependencies.cc2
-rw-r--r--paludis/repositories/e/qa/extractors.cc4
-rw-r--r--paludis/repositories/e/qa/spec_keys.cc2
-rw-r--r--paludis/repositories/e/qa/visibility.cc2
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc6
-rwxr-xr-xpaludis/repositories/e/vdb_repository_TEST_setup.sh2
-rw-r--r--paludis/repositories/fake/dep_parser_TEST.cc2
-rw-r--r--paludis/repositories/fake/fake_package_id.cc33
-rw-r--r--paludis/repositories/fake/fake_package_id.hh4
-rw-r--r--paludis/repositories/unpackaged/dep_printer.cc2
-rw-r--r--paludis/repositories/unpackaged/dep_printer.hh4
-rw-r--r--paludis/repositories/unpackaged/installed_id.cc18
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.cc12
-rw-r--r--paludis/repositories/unpackaged/unpackaged_key.cc8
-rw-r--r--paludis/repositories/unpackaged/unpackaged_key.hh4
-rw-r--r--paludis/repositories/virtuals/package_id.cc20
-rw-r--r--paludis/repositories/virtuals/package_id.hh4
-rw-r--r--paludis/resolver/resolver.cc34
-rwxr-xr-xpaludis/resolver/resolver_TEST_serialisation_setup.sh2
-rwxr-xr-xpaludis/resolver/resolver_TEST_suggestions_setup.sh10
-rw-r--r--paludis/resolver/resolver_test.cc55
-rw-r--r--paludis/resolver/resolver_test.hh2
-rw-r--r--paludis/resolver/sanitised_dependencies.cc39
-rw-r--r--paludis/resolver/sanitised_dependencies.hh2
-rw-r--r--paludis/show_suggest_visitor.cc66
-rw-r--r--paludis/show_suggest_visitor.hh4
-rw-r--r--paludis/spec_tree-fwd.hh4
-rw-r--r--paludis/spec_tree.cc18
-rw-r--r--paludis/spec_tree.hh4
-rw-r--r--paludis/stringify_formatter-impl.hh10
-rw-r--r--paludis/stringify_formatter.cc4
-rw-r--r--paludis/stringify_formatter.hh6
-rw-r--r--paludis/uninstall_list.cc2
-rw-r--r--python/dep_label.cc141
-rwxr-xr-xpython/dep_label_TEST.py31
-rw-r--r--python/dep_spec.cc28
-rw-r--r--python/dep_spec.hh18
-rw-r--r--python/formatter.cc20
-rw-r--r--python/metadata_key.cc6
-rw-r--r--python/nice_names.nn4
-rw-r--r--ruby/Makefile.am1
-rw-r--r--ruby/dep_label.cc433
-rw-r--r--ruby/dep_label_TEST.rb34
-rw-r--r--ruby/dep_spec.cc54
-rw-r--r--ruby/dep_spec_TEST.rb6
-rw-r--r--ruby/metadata_key.cc6
-rw-r--r--ruby/nice_names.nn2
-rw-r--r--ruby/paludis_ruby.hh9
-rw-r--r--src/clients/adjutrix/find_reverse_deps.cc2
-rw-r--r--src/clients/cave/cmd_resolve.cc108
-rw-r--r--src/clients/cave/cmd_resolve_dump.cc14
-rw-r--r--src/clients/cave/colour_formatter.cc2
-rw-r--r--src/clients/cave/colour_formatter.hh4
-rw-r--r--src/clients/inquisitio/key_extractor.cc2
-rw-r--r--src/output/colour_formatter.cc2
-rw-r--r--src/output/colour_formatter.hh6
-rw-r--r--src/output/console_query_task.cc2
92 files changed, 794 insertions, 1624 deletions
diff --git a/doc/api/cplusplus/examples/example_formatter.cc b/doc/api/cplusplus/examples/example_formatter.cc
index 9714ac3..447a851 100644
--- a/doc/api/cplusplus/examples/example_formatter.cc
+++ b/doc/api/cplusplus/examples/example_formatter.cc
@@ -69,7 +69,7 @@ namespace
class HTMLFormatter :
public CanSpace,
public CanFormat<PackageDepSpec>,
- public CanFormat<DependencyLabelsDepSpec>,
+ public CanFormat<DependenciesLabelsDepSpec>,
public CanFormat<ConditionalDepSpec>,
public CanFormat<NamedSetDepSpec>,
public CanFormat<BlockDepSpec>
@@ -92,7 +92,7 @@ namespace
return span_colour(escape_html(stringify(s)), "#66ff66");
}
- std::string format(const DependencyLabelsDepSpec & s, const format::Plain &) const
+ std::string format(const DependenciesLabelsDepSpec & s, const format::Plain &) const
{
return span_colour(escape_html(stringify(s)), "#666666");
}
diff --git a/paludis/dep_label-fwd.hh b/paludis/dep_label-fwd.hh
index 7e9e7a6..76b3705 100644
--- a/paludis/dep_label-fwd.hh
+++ b/paludis/dep_label-fwd.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -63,207 +63,154 @@ namespace paludis
*/
std::ostream & operator<< (std::ostream &, const URILabel &) PALUDIS_VISIBLE;
- struct DependencyLabel;
- struct DependencySystemLabel;
- struct DependencyTypeLabel;
- struct DependencySuggestLabel;
- struct DependencyABIsLabel;
+ struct DependenciesLabel;
- /**
- * A collection of DependencyLabel instances.
- *
- * \ingroup g_dep_spec
- * \since 0.26
- */
- typedef Sequence<std::tr1::shared_ptr<const DependencyLabel> > DependencyLabelSequence;
+ template <typename>
+ struct ConcreteDependenciesLabel;
/**
- * A collection of DependencySystemLabel instances.
+ * Tag for DependenciesBuildLabel.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef Sequence<std::tr1::shared_ptr<const DependencySystemLabel> > DependencySystemLabelSequence;
+ struct DependenciesBuildLabelTag;
/**
- * A collection of DependencyTypeLabel instances.
+ * Dependencies label.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef Sequence<std::tr1::shared_ptr<const DependencyTypeLabel> > DependencyTypeLabelSequence;
+ typedef ConcreteDependenciesLabel<DependenciesBuildLabelTag> DependenciesBuildLabel;
/**
- * A collection of DependencySuggestLabel instances.
+ * Tag for DependenciesRunLabel.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef Sequence<std::tr1::shared_ptr<const DependencySuggestLabel> > DependencySuggestLabelSequence;
+ struct DependenciesRunLabelTag;
/**
- * A collection of DependencyABIsLabel instances.
+ * Dependencies label.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef Sequence<std::tr1::shared_ptr<const DependencyABIsLabel> > DependencyABIsLabelSequence;
-
- template <typename T_, typename Category_> struct ConcreteDependencyLabel;
-
- struct DependencyHostLabelTag;
+ typedef ConcreteDependenciesLabel<DependenciesRunLabelTag> DependenciesRunLabel;
/**
- * A DependencyHostLabel specifies host requirements for building a package.
+ * Tag for DependenciesPostLabel.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef ConcreteDependencyLabel<DependencyHostLabelTag, DependencySystemLabel> DependencyHostLabel;
-
- struct DependencyTargetLabelTag;
+ struct DependenciesPostLabelTag;
/**
- * A DependencyTargetLabel specifies target requirements for building a package.
+ * Dependencies label.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef ConcreteDependencyLabel<DependencyTargetLabelTag, DependencySystemLabel> DependencyTargetLabel;
-
- struct DependencyBuildLabelTag;
+ typedef ConcreteDependenciesLabel<DependenciesPostLabelTag> DependenciesPostLabel;
/**
- * A DependencyBuildLabel specifies build-time requirements for building a package.
+ * Tag for DependenciesCompileAgainstLabel.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef ConcreteDependencyLabel<DependencyBuildLabelTag, DependencyTypeLabel> DependencyBuildLabel;
-
- struct DependencyRunLabelTag;
+ struct DependenciesCompileAgainstLabelTag;
/**
- * A DependencyRunLabel specifies runtime requirements for building a package.
+ * Dependencies label.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef ConcreteDependencyLabel<DependencyRunLabelTag, DependencyTypeLabel> DependencyRunLabel;
-
- struct DependencyPostLabelTag;
+ typedef ConcreteDependenciesLabel<DependenciesCompileAgainstLabelTag> DependenciesCompileAgainstLabel;
/**
- * A DependencyPostLabel specifies build-time requirements for building a package.
+ * Tag for DependenciesFetchLabel.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef ConcreteDependencyLabel<DependencyPostLabelTag, DependencyTypeLabel> DependencyPostLabel;
-
- struct DependencyInstallLabelTag;
+ struct DependenciesFetchLabelTag;
/**
- * A DependencyInstallLabel specifies install-time requirements for building a package.
+ * Dependencies label.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef ConcreteDependencyLabel<DependencyInstallLabelTag, DependencyTypeLabel> DependencyInstallLabel;
-
- struct DependencyCompileLabelTag;
+ typedef ConcreteDependenciesLabel<DependenciesFetchLabelTag> DependenciesFetchLabel;
/**
- * A DependencyCompileLabel specifies compiled-against requirements for building a package.
+ * Tag for DependenciesInstallLabel.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef ConcreteDependencyLabel<DependencyCompileLabelTag, DependencyTypeLabel> DependencyCompileLabel;
-
- struct DependencySuggestedLabelTag;
+ struct DependenciesInstallLabelTag;
/**
- * A DependencySuggestLabel specifies that a dependency is suggested.
+ * Dependencies label.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef ConcreteDependencyLabel<DependencySuggestedLabelTag, DependencySuggestLabel> DependencySuggestedLabel;
-
- struct DependencyRecommendedLabelTag;
+ typedef ConcreteDependenciesLabel<DependenciesInstallLabelTag> DependenciesInstallLabel;
/**
- * A DependencyRecommendedLabel specifies that a dependency is recommended.
+ * Tag for DependenciesSuggestionLabel.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef ConcreteDependencyLabel<DependencyRecommendedLabelTag, DependencySuggestLabel> DependencyRecommendedLabel;
-
- struct DependencyRequiredLabelTag;
+ struct DependenciesSuggestionLabelTag;
/**
- * A DependencyRequiredLabel specifies that a dependency is required.
+ * Dependencies label.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef ConcreteDependencyLabel<DependencyRequiredLabelTag, DependencySuggestLabel> DependencyRequiredLabel;
-
- struct DependencyAnyLabelTag;
+ typedef ConcreteDependenciesLabel<DependenciesSuggestionLabelTag> DependenciesSuggestionLabel;
/**
- * A DependencyAnyLabel specifies that a dependency can be satisfied by
- * any ABI.
+ * Tag for DependenciesRecommendationLabel.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef ConcreteDependencyLabel<DependencyAnyLabelTag, DependencyABIsLabel> DependencyAnyLabel;
-
- struct DependencyMineLabelTag;
+ struct DependenciesRecommendationLabelTag;
/**
- * A DependencyMineLabel specifies that a dependency is satisfied by
- * ABIs equal to those being used to create the depending package.
+ * Dependencies label.
*
+ * \since 0.42
* \ingroup g_dep_spec
- * \since 0.26
*/
- typedef ConcreteDependencyLabel<DependencyMineLabelTag, DependencyABIsLabel> DependencyMineLabel;
-
- struct DependencyPrimaryLabelTag;
+ typedef ConcreteDependenciesLabel<DependenciesRecommendationLabelTag> DependenciesRecommendationLabel;
/**
- * A DependencyPrimaryLabel specifies that a dependency can be satisfied by
- * the primary ABI.
- *
- * \ingroup g_dep_spec
- * \since 0.26
- */
- typedef ConcreteDependencyLabel<DependencyPrimaryLabelTag, DependencyABIsLabel> DependencyPrimaryLabel;
-
- struct DependencyABILabelTag;
-
- /**
- * A DependencyABILabel specifies that a dependency can be satisfied by
- * a named ABI.
+ * A collection of DependencyLabel instances.
*
* \ingroup g_dep_spec
- * \since 0.26
+ * \since 0.42
*/
- typedef ConcreteDependencyLabel<DependencyABILabelTag, DependencyABIsLabel> DependencyABILabel;
+ typedef Sequence<std::tr1::shared_ptr<const DependenciesLabel> > DependenciesLabelSequence;
/**
- * A DependencyLabel can be written to a stream.
+ * A DependenciesLabel can be written to a stream.
*
* \ingroup g_dep_spec
- * \since 0.26
+ * \since 0.42
*/
- std::ostream & operator<< (std::ostream &, const DependencyLabel &) PALUDIS_VISIBLE;
-
- struct ActiveDependencyLabels;
+ std::ostream & operator<< (std::ostream &, const DependenciesLabel &) PALUDIS_VISIBLE;
}
#endif
diff --git a/paludis/dep_label.cc b/paludis/dep_label.cc
index be7f1b9..204fc49 100644
--- a/paludis/dep_label.cc
+++ b/paludis/dep_label.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -27,11 +27,7 @@
using namespace paludis;
-template class Sequence<std::tr1::shared_ptr<const DependencyLabel> >;
-template class Sequence<std::tr1::shared_ptr<const DependencySystemLabel> >;
-template class Sequence<std::tr1::shared_ptr<const DependencyTypeLabel> >;
-template class Sequence<std::tr1::shared_ptr<const DependencySuggestLabel> >;
-template class Sequence<std::tr1::shared_ptr<const DependencyABIsLabel> >;
+template class Sequence<std::tr1::shared_ptr<const DependenciesLabel> >;
std::ostream &
paludis::operator<< (std::ostream & s, const URILabel & l)
@@ -41,7 +37,7 @@ paludis::operator<< (std::ostream & s, const URILabel & l)
}
std::ostream &
-paludis::operator<< (std::ostream & s, const DependencyLabel & l)
+paludis::operator<< (std::ostream & s, const DependenciesLabel & l)
{
s << l.text();
return s;
@@ -51,26 +47,9 @@ URILabel::~URILabel()
{
}
-namespace paludis
-{
-#ifndef PALUDIS_NO_DOUBLE_TEMPLATE
- template <>
-#endif
- template <typename T_>
- struct Implementation<ConcreteURILabel<T_> >
- {
- const std::string text;
-
- Implementation(const std::string & t) :
- text(t)
- {
- }
- };
-}
-
template <typename T_>
ConcreteURILabel<T_>::ConcreteURILabel(const std::string & t) :
- PrivateImplementationPattern<ConcreteURILabel<T_> >(new Implementation<ConcreteURILabel<T_> >(t))
+ _text(t)
{
}
@@ -83,264 +62,34 @@ template <typename T_>
const std::string
ConcreteURILabel<T_>::text() const
{
- return _imp->text;
-}
-
-std::ostream & operator<<(std::ostream & s, const DependencyLabel & l)
-{
- s << l.text();
- return s;
-}
-
-DependencyLabel::~DependencyLabel()
-{
+ return _text;
}
-namespace paludis
+DependenciesLabel::~DependenciesLabel()
{
-#ifndef PALUDIS_NO_DOUBLE_TEMPLATE
- template <>
-#endif
- template <typename T_, typename C_>
- struct Implementation<ConcreteDependencyLabel<T_, C_> >
- {
- const std::string text;
-
- Implementation(const std::string & t) :
- text(t)
- {
- }
- };
}
-template <typename T_, typename C_>
-ConcreteDependencyLabel<T_, C_>::ConcreteDependencyLabel(const std::string & t) :
- PrivateImplementationPattern<ConcreteDependencyLabel<T_, C_> >(new Implementation<ConcreteDependencyLabel<T_, C_> >(t))
+template <typename T_>
+ConcreteDependenciesLabel<T_>::ConcreteDependenciesLabel(const std::string & t) :
+ _text(t)
{
}
-template <typename T_, typename C_>
-ConcreteDependencyLabel<T_, C_>::~ConcreteDependencyLabel()
+template <typename T_>
+ConcreteDependenciesLabel<T_>::~ConcreteDependenciesLabel()
{
}
-template <typename T_, typename C_>
+template <typename T_>
const std::string
-ConcreteDependencyLabel<T_, C_>::text() const
+ConcreteDependenciesLabel<T_>::text() const
{
- return _imp->text;
+ return _text;
}
-namespace paludis
-{
- template <>
- struct Implementation<ActiveDependencyLabels>
- {
- std::tr1::shared_ptr<DependencySystemLabelSequence> system_labels;
- std::tr1::shared_ptr<DependencyTypeLabelSequence> type_labels;
- std::tr1::shared_ptr<DependencyABIsLabelSequence> abi_labels;
- std::tr1::shared_ptr<DependencySuggestLabelSequence> suggest_labels;
- };
-}
-
-namespace
-{
- struct LabelsPopulator
- {
- Implementation<ActiveDependencyLabels> & _imp;
- const std::tr1::shared_ptr<const DependencyLabel> _l;
-
- LabelsPopulator(Implementation<ActiveDependencyLabels> & i,
- const std::tr1::shared_ptr<const DependencyLabel> & l) :
- _imp(i),
- _l(l)
- {
- }
-
- void visit(const DependencySuggestLabel &)
- {
- if (! _imp.suggest_labels)
- _imp.suggest_labels.reset(new DependencySuggestLabelSequence);
- _imp.suggest_labels->push_back(std::tr1::static_pointer_cast<const DependencySuggestLabel>(_l));
- }
-
- void visit(const DependencySystemLabel &)
- {
- if (! _imp.system_labels)
- _imp.system_labels.reset(new DependencySystemLabelSequence);
- _imp.system_labels->push_back(std::tr1::static_pointer_cast<const DependencySystemLabel>(_l));
- }
-
- void visit(const DependencyABIsLabel &)
- {
- if (! _imp.abi_labels)
- _imp.abi_labels.reset(new DependencyABIsLabelSequence);
- _imp.abi_labels->push_back(std::tr1::static_pointer_cast<const DependencyABIsLabel>(_l));
- }
-
- void visit(const DependencyTypeLabel &)
- {
- if (! _imp.type_labels)
- _imp.type_labels.reset(new DependencyTypeLabelSequence);
- _imp.type_labels->push_back(std::tr1::static_pointer_cast<const DependencyTypeLabel>(_l));
- }
- };
-}
-
-ActiveDependencyLabels::ActiveDependencyLabels(const DependencyLabelsDepSpec & spec) :
- PrivateImplementationPattern<ActiveDependencyLabels>(new Implementation<ActiveDependencyLabels>)
-{
- for (DependencyLabelsDepSpec::ConstIterator i(spec.begin()), i_end(spec.end()) ;
- i != i_end ; ++i)
- {
- LabelsPopulator p(*_imp.get(), *i);
- (*i)->accept(p);
- }
-
- if (! _imp->system_labels)
- _imp->system_labels.reset(new DependencySystemLabelSequence);
- if (! _imp->type_labels)
- _imp->type_labels.reset(new DependencyTypeLabelSequence);
- if (! _imp->suggest_labels)
- _imp->suggest_labels.reset(new DependencySuggestLabelSequence);
- if (! _imp->abi_labels)
- _imp->abi_labels.reset(new DependencyABIsLabelSequence);
-}
-
-ActiveDependencyLabels::ActiveDependencyLabels(const ActiveDependencyLabels & other) :
- PrivateImplementationPattern<ActiveDependencyLabels>(new Implementation<ActiveDependencyLabels>)
-{
- _imp->system_labels.reset(new DependencySystemLabelSequence);
- std::copy(other._imp->system_labels->begin(), other._imp->system_labels->end(), _imp->system_labels->back_inserter());
-
- _imp->type_labels.reset(new DependencyTypeLabelSequence);
- std::copy(other._imp->type_labels->begin(), other._imp->type_labels->end(), _imp->type_labels->back_inserter());
-
- _imp->suggest_labels.reset(new DependencySuggestLabelSequence);
- std::copy(other._imp->suggest_labels->begin(), other._imp->suggest_labels->end(), _imp->suggest_labels->back_inserter());
-
- _imp->abi_labels.reset(new DependencyABIsLabelSequence);
- std::copy(other._imp->abi_labels->begin(), other._imp->abi_labels->end(), _imp->abi_labels->back_inserter());
-}
-
-ActiveDependencyLabels::ActiveDependencyLabels(const ActiveDependencyLabels & other, const DependencyLabelsDepSpec & spec) :
- PrivateImplementationPattern<ActiveDependencyLabels>(new Implementation<ActiveDependencyLabels>)
-{
- for (DependencyLabelsDepSpec::ConstIterator i(spec.begin()), i_end(spec.end()) ;
- i != i_end ; ++i)
- {
- LabelsPopulator p(*_imp.get(), *i);
- (*i)->accept(p);
- }
-
- if (! _imp->system_labels)
- {
- _imp->system_labels.reset(new DependencySystemLabelSequence);
- std::copy(other._imp->system_labels->begin(), other._imp->system_labels->end(), _imp->system_labels->back_inserter());
- }
- if (! _imp->type_labels)
- {
- _imp->type_labels.reset(new DependencyTypeLabelSequence);
- std::copy(other._imp->type_labels->begin(), other._imp->type_labels->end(), _imp->type_labels->back_inserter());
- }
- if (! _imp->suggest_labels)
- {
- _imp->suggest_labels.reset(new DependencySuggestLabelSequence);
- std::copy(other._imp->suggest_labels->begin(), other._imp->suggest_labels->end(), _imp->suggest_labels->back_inserter());
- }
- if (! _imp->abi_labels)
- {
- _imp->abi_labels.reset(new DependencyABIsLabelSequence);
- std::copy(other._imp->abi_labels->begin(), other._imp->abi_labels->end(), _imp->abi_labels->back_inserter());
- }
-}
-
-ActiveDependencyLabels::ActiveDependencyLabels(const DependencyLabelSequence & spec) :
- PrivateImplementationPattern<ActiveDependencyLabels>(new Implementation<ActiveDependencyLabels>)
-{
- for (DependencyLabelSequence::ConstIterator i(spec.begin()), i_end(spec.end()) ;
- i != i_end ; ++i)
- {
- LabelsPopulator p(*_imp.get(), *i);
- (*i)->accept(p);
- }
-
- if (! _imp->system_labels)
- _imp->system_labels.reset(new DependencySystemLabelSequence);
- if (! _imp->type_labels)
- _imp->type_labels.reset(new DependencyTypeLabelSequence);
- if (! _imp->suggest_labels)
- _imp->suggest_labels.reset(new DependencySuggestLabelSequence);
- if (! _imp->abi_labels)
- _imp->abi_labels.reset(new DependencyABIsLabelSequence);
-}
-
-ActiveDependencyLabels::~ActiveDependencyLabels()
-{
-}
-
-ActiveDependencyLabels &
-ActiveDependencyLabels::operator= (const ActiveDependencyLabels & other)
-{
- if (this != &other)
- {
- _imp->system_labels.reset(new DependencySystemLabelSequence);
- std::copy(other._imp->system_labels->begin(), other._imp->system_labels->end(), _imp->system_labels->back_inserter());
-
- _imp->type_labels.reset(new DependencyTypeLabelSequence);
- std::copy(other._imp->type_labels->begin(), other._imp->type_labels->end(), _imp->type_labels->back_inserter());
-
- _imp->suggest_labels.reset(new DependencySuggestLabelSequence);
- std::copy(other._imp->suggest_labels->begin(), other._imp->suggest_labels->end(), _imp->suggest_labels->back_inserter());
-
- _imp->abi_labels.reset(new DependencyABIsLabelSequence);
- std::copy(other._imp->abi_labels->begin(), other._imp->abi_labels->end(), _imp->abi_labels->back_inserter());
- }
- return *this;
-}
-
-const std::tr1::shared_ptr<const DependencySystemLabelSequence>
-ActiveDependencyLabels::system_labels() const
-{
- return _imp->system_labels;
-}
-
-const std::tr1::shared_ptr<const DependencyTypeLabelSequence>
-ActiveDependencyLabels::type_labels() const
-{
- return _imp->type_labels;
-}
-
-const std::tr1::shared_ptr<const DependencyABIsLabelSequence>
-ActiveDependencyLabels::abi_labels() const
-{
- return _imp->abi_labels;
-}
-
-const std::tr1::shared_ptr<const DependencySuggestLabelSequence>
-ActiveDependencyLabels::suggest_labels() const
-{
- return _imp->suggest_labels;
-}
-
-template class InstantiationPolicy<DependencyLabel, instantiation_method::NonCopyableTag>;
+template class InstantiationPolicy<DependenciesLabel, instantiation_method::NonCopyableTag>;
template class InstantiationPolicy<URILabel, instantiation_method::NonCopyableTag>;
-template class ConcreteDependencyLabel<DependencyHostLabelTag, DependencySystemLabel>;
-template class ConcreteDependencyLabel<DependencyTargetLabelTag, DependencySystemLabel>;
-template class ConcreteDependencyLabel<DependencyBuildLabelTag, DependencyTypeLabel>;
-template class ConcreteDependencyLabel<DependencyRunLabelTag, DependencyTypeLabel>;
-template class ConcreteDependencyLabel<DependencyPostLabelTag, DependencyTypeLabel>;
-template class ConcreteDependencyLabel<DependencyInstallLabelTag, DependencyTypeLabel>;
-template class ConcreteDependencyLabel<DependencyCompileLabelTag, DependencyTypeLabel>;
-template class ConcreteDependencyLabel<DependencySuggestedLabelTag, DependencySuggestLabel>;
-template class ConcreteDependencyLabel<DependencyRecommendedLabelTag, DependencySuggestLabel>;
-template class ConcreteDependencyLabel<DependencyRequiredLabelTag, DependencySuggestLabel>;
-template class ConcreteDependencyLabel<DependencyAnyLabelTag, DependencyABIsLabel>;
-template class ConcreteDependencyLabel<DependencyMineLabelTag, DependencyABIsLabel>;
-template class ConcreteDependencyLabel<DependencyPrimaryLabelTag, DependencyABIsLabel>;
-template class ConcreteDependencyLabel<DependencyABILabelTag, DependencyABIsLabel>;
-
template class ConcreteURILabel<URIMirrorsThenListedLabelTag>;
template class ConcreteURILabel<URIMirrorsOnlyLabelTag>;
template class ConcreteURILabel<URIListedOnlyLabelTag>;
@@ -348,27 +97,12 @@ template class ConcreteURILabel<URIListedThenMirrorsLabelTag>;
template class ConcreteURILabel<URILocalMirrorsOnlyLabelTag>;
template class ConcreteURILabel<URIManualOnlyLabelTag>;
-template class PrivateImplementationPattern<ConcreteURILabel<URIMirrorsThenListedLabel> >;
-template class PrivateImplementationPattern<ConcreteURILabel<URIMirrorsOnlyLabel> >;
-template class PrivateImplementationPattern<ConcreteURILabel<URIListedOnlyLabel> >;
-template class PrivateImplementationPattern<ConcreteURILabel<URIListedThenMirrorsLabel> >;
-template class PrivateImplementationPattern<ConcreteURILabel<URILocalMirrorsOnlyLabel> >;
-template class PrivateImplementationPattern<ConcreteURILabel<URIManualOnlyLabel> >;
-
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyHostLabelTag, DependencySystemLabel> >;
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyTargetLabelTag, DependencySystemLabel> >;
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyBuildLabelTag, DependencyTypeLabel> >;
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyRunLabelTag, DependencyTypeLabel> >;
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyPostLabelTag, DependencyTypeLabel> >;
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyInstallLabelTag, DependencyTypeLabel> >;
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyCompileLabelTag, DependencyTypeLabel> >;
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencySuggestedLabelTag, DependencySuggestLabel> >;
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyRecommendedLabelTag, DependencySuggestLabel> >;
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyRequiredLabelTag, DependencySuggestLabel> >;
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyAnyLabelTag, DependencyABIsLabel> >;
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyMineLabelTag, DependencyABIsLabel> >;
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyPrimaryLabelTag, DependencyABIsLabel> >;
-template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyABILabelTag, DependencyABIsLabel> >;
-
-template class PrivateImplementationPattern<ActiveDependencyLabels>;
+template class ConcreteDependenciesLabel<DependenciesBuildLabelTag>;
+template class ConcreteDependenciesLabel<DependenciesRunLabelTag>;
+template class ConcreteDependenciesLabel<DependenciesPostLabelTag>;
+template class ConcreteDependenciesLabel<DependenciesCompileAgainstLabelTag>;
+template class ConcreteDependenciesLabel<DependenciesFetchLabelTag>;
+template class ConcreteDependenciesLabel<DependenciesInstallLabelTag>;
+template class ConcreteDependenciesLabel<DependenciesSuggestionLabelTag>;
+template class ConcreteDependenciesLabel<DependenciesRecommendationLabelTag>;
diff --git a/paludis/dep_label.hh b/paludis/dep_label.hh
index a60b283..06c9775 100644
--- a/paludis/dep_label.hh
+++ b/paludis/dep_label.hh
@@ -78,11 +78,10 @@ namespace paludis
template <typename T_>
class PALUDIS_VISIBLE ConcreteURILabel :
public URILabel,
- public ImplementAcceptMethods<URILabel, ConcreteURILabel<T_> >,
- private PrivateImplementationPattern<ConcreteURILabel<T_> >
+ public ImplementAcceptMethods<URILabel, ConcreteURILabel<T_> >
{
private:
- using PrivateImplementationPattern<ConcreteURILabel<T_> >::_imp;
+ const std::string _text;
public:
///\name Basic operations
@@ -100,22 +99,23 @@ namespace paludis
};
/**
- * Dependency label base class.
+ * Dependencies label base class.
*
- * \since 0.26
+ * \since 0.42
* \ingroup g_dep_spec
- * \nosubgrouping
*/
- class PALUDIS_VISIBLE DependencyLabel :
- private InstantiationPolicy<DependencyLabel, instantiation_method::NonCopyableTag>,
- public virtual DeclareAbstractAcceptMethods<DependencyLabel, MakeTypeList<
- DependencySystemLabel, DependencyTypeLabel, DependencySuggestLabel, DependencyABIsLabel>::Type>
+ class PALUDIS_VISIBLE DependenciesLabel :
+ private InstantiationPolicy<DependenciesLabel, instantiation_method::NonCopyableTag>,
+ public virtual DeclareAbstractAcceptMethods<DependenciesLabel, MakeTypeList<
+ DependenciesBuildLabel, DependenciesRunLabel, DependenciesPostLabel, DependenciesCompileAgainstLabel,
+ DependenciesFetchLabel, DependenciesInstallLabel, DependenciesSuggestionLabel,
+ DependenciesRecommendationLabel>::Type>
{
public:
///\name Basic operations
///\{
- virtual ~DependencyLabel() = 0;
+ virtual ~DependenciesLabel() = 0;
///\}
@@ -124,125 +124,25 @@ namespace paludis
};
/**
- * System dependency label base class.
- *
- * \since 0.26
- * \ingroup g_dep_spec
- * \nosubgrouping
- */
- struct PALUDIS_VISIBLE DependencySystemLabel :
- public DependencyLabel,
- public ImplementAcceptMethods<DependencyLabel, DependencySystemLabel>,
- public virtual DeclareAbstractAcceptMethods<DependencySystemLabel, MakeTypeList<
- DependencyHostLabel, DependencyTargetLabel>::Type>
- {
- typedef DeclareAbstractAcceptMethods<DependencySystemLabel, MakeTypeList<
- DependencyHostLabel, DependencyTargetLabel>::Type>::VisitableTypeList VisitableTypeList;
-
- using DeclareAbstractAcceptMethods<DependencySystemLabel, MakeTypeList<
- DependencyHostLabel, DependencyTargetLabel>::Type>::accept;
- using DeclareAbstractAcceptMethods<DependencySystemLabel, MakeTypeList<
- DependencyHostLabel, DependencyTargetLabel>::Type>::accept_returning;
- };
-
- /**
- * Type dependency label base class.
- *
- * \since 0.26
- * \ingroup g_dep_spec
- * \nosubgrouping
- */
- struct PALUDIS_VISIBLE DependencyTypeLabel :
- public DependencyLabel,
- public ImplementAcceptMethods<DependencyLabel, DependencyTypeLabel>,
- public virtual DeclareAbstractAcceptMethods<DependencyTypeLabel, MakeTypeList<
- DependencyBuildLabel, DependencyRunLabel, DependencyPostLabel, DependencyInstallLabel,
- DependencyCompileLabel>::Type>
- {
- typedef DeclareAbstractAcceptMethods<DependencyTypeLabel, MakeTypeList<
- DependencyBuildLabel, DependencyRunLabel, DependencyPostLabel, DependencyInstallLabel,
- DependencyCompileLabel>::Type>::VisitableTypeList VisitableTypeList;
-
- using DeclareAbstractAcceptMethods<DependencyTypeLabel, MakeTypeList<
- DependencyBuildLabel, DependencyRunLabel, DependencyPostLabel, DependencyInstallLabel,
- DependencyCompileLabel>::Type>::accept;
- using DeclareAbstractAcceptMethods<DependencyTypeLabel, MakeTypeList<
- DependencyBuildLabel, DependencyRunLabel, DependencyPostLabel, DependencyInstallLabel,
- DependencyCompileLabel>::Type>::accept_returning;
- };
-
- /**
- * Suggest dependency label base class.
- *
- * \since 0.26
- * \ingroup g_dep_spec
- * \nosubgrouping
- */
- struct PALUDIS_VISIBLE DependencySuggestLabel :
- public DependencyLabel,
- public ImplementAcceptMethods<DependencyLabel, DependencySuggestLabel>,
- public virtual DeclareAbstractAcceptMethods<DependencySuggestLabel, MakeTypeList<
- DependencySuggestedLabel, DependencyRecommendedLabel, DependencyRequiredLabel>::Type>
- {
- typedef DeclareAbstractAcceptMethods<DependencySuggestLabel, MakeTypeList<
- DependencySuggestedLabel, DependencyRecommendedLabel,
- DependencyRequiredLabel>::Type>::VisitableTypeList VisitableTypeList;
-
- using DeclareAbstractAcceptMethods<DependencySuggestLabel, MakeTypeList<
- DependencySuggestedLabel, DependencyRecommendedLabel,
- DependencyRequiredLabel>::Type>::accept;
- using DeclareAbstractAcceptMethods<DependencySuggestLabel, MakeTypeList<
- DependencySuggestedLabel, DependencyRecommendedLabel,
- DependencyRequiredLabel>::Type>::accept_returning;
- };
-
- /**
- * ABI dependency label base class.
- *
- * \since 0.26
- * \ingroup g_dep_spec
- * \nosubgrouping
- */
- struct PALUDIS_VISIBLE DependencyABIsLabel :
- public DependencyLabel,
- public ImplementAcceptMethods<DependencyLabel, DependencyABIsLabel>,
- public virtual DeclareAbstractAcceptMethods<DependencyABIsLabel, MakeTypeList<
- DependencyAnyLabel, DependencyMineLabel, DependencyPrimaryLabel, DependencyABILabel>::Type>
- {
- typedef DeclareAbstractAcceptMethods<DependencyABIsLabel, MakeTypeList<
- DependencyAnyLabel, DependencyMineLabel, DependencyPrimaryLabel,
- DependencyABILabel>::Type>::VisitableTypeList VisitableTypeList;
-
- using DeclareAbstractAcceptMethods<DependencyABIsLabel, MakeTypeList<
- DependencyAnyLabel, DependencyMineLabel, DependencyPrimaryLabel,
- DependencyABILabel>::Type>::accept;
- using DeclareAbstractAcceptMethods<DependencyABIsLabel, MakeTypeList<
- DependencyAnyLabel, DependencyMineLabel, DependencyPrimaryLabel,
- DependencyABILabel>::Type>::accept_returning;
- };
-
- /**
- * A concrete dependency label class.
+ * A concrete dependencies label class.
*
- * \since 0.26
+ * \since 0.42
* \ingroup g_dep_spec
- * \nosubgrouping
*/
- template <typename T_, typename C_>
- class PALUDIS_VISIBLE ConcreteDependencyLabel :
- public C_,
- public ImplementAcceptMethods<C_, ConcreteDependencyLabel<T_, C_> >,
- private PrivateImplementationPattern<ConcreteDependencyLabel<T_, C_> >
+ template <typename T_>
+ class PALUDIS_VISIBLE ConcreteDependenciesLabel :
+ public DependenciesLabel,
+ public ImplementAcceptMethods<DependenciesLabel, ConcreteDependenciesLabel<T_> >
{
private:
- using PrivateImplementationPattern<ConcreteDependencyLabel<T_, C_> >::_imp;
+ const std::string _text;
public:
///\name Basic operations
///\{
- ConcreteDependencyLabel(const std::string &);
- ~ConcreteDependencyLabel();
+ ConcreteDependenciesLabel(const std::string &);
+ ~ConcreteDependenciesLabel();
///\}
@@ -252,58 +152,9 @@ namespace paludis
typedef T_ Tag;
};
- /**
- * A collection of each dependency label type.
- *
- * \since 0.26
- * \ingroup g_dep_spec
- */
- class PALUDIS_VISIBLE ActiveDependencyLabels :
- private PrivateImplementationPattern<ActiveDependencyLabels>
- {
- public:
- ///\name Basic operations
- ///\{
-
- ActiveDependencyLabels(const DependencyLabelsDepSpec &);
- ActiveDependencyLabels(const DependencyLabelSequence &);
- ActiveDependencyLabels(const ActiveDependencyLabels &);
- ActiveDependencyLabels(const ActiveDependencyLabels &, const DependencyLabelsDepSpec &);
- ~ActiveDependencyLabels();
-
- ActiveDependencyLabels & operator= (const ActiveDependencyLabels &);
-
- ///\}
-
- ///\name Current label selections
- ///\{
-
- const std::tr1::shared_ptr<const DependencySystemLabelSequence> system_labels() const PALUDIS_ATTRIBUTE((warn_unused_result));
- const std::tr1::shared_ptr<const DependencyTypeLabelSequence> type_labels() const PALUDIS_ATTRIBUTE((warn_unused_result));
- const std::tr1::shared_ptr<const DependencyABIsLabelSequence> abi_labels() const PALUDIS_ATTRIBUTE((warn_unused_result));
- const std::tr1::shared_ptr<const DependencySuggestLabelSequence> suggest_labels() const PALUDIS_ATTRIBUTE((warn_unused_result));
-
- ///\}
- };
-
#ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
- extern template class InstantiationPolicy<DependencyLabel, instantiation_method::NonCopyableTag>;
extern template class InstantiationPolicy<URILabel, instantiation_method::NonCopyableTag>;
-
- extern template class ConcreteDependencyLabel<DependencyHostLabelTag, DependencySystemLabel>;
- extern template class ConcreteDependencyLabel<DependencyTargetLabelTag, DependencySystemLabel>;
- extern template class ConcreteDependencyLabel<DependencyBuildLabelTag, DependencyTypeLabel>;
- extern template class ConcreteDependencyLabel<DependencyRunLabelTag, DependencyTypeLabel>;
- extern template class ConcreteDependencyLabel<DependencyPostLabelTag, DependencyTypeLabel>;
- extern template class ConcreteDependencyLabel<DependencyInstallLabelTag, DependencyTypeLabel>;
- extern template class ConcreteDependencyLabel<DependencyCompileLabelTag, DependencyTypeLabel>;
- extern template class ConcreteDependencyLabel<DependencySuggestedLabelTag, DependencySuggestLabel>;
- extern template class ConcreteDependencyLabel<DependencyRecommendedLabelTag, DependencySuggestLabel>;
- extern template class ConcreteDependencyLabel<DependencyRequiredLabelTag, DependencySuggestLabel>;
- extern template class ConcreteDependencyLabel<DependencyAnyLabelTag, DependencyABIsLabel>;
- extern template class ConcreteDependencyLabel<DependencyMineLabelTag, DependencyABIsLabel>;
- extern template class ConcreteDependencyLabel<DependencyPrimaryLabelTag, DependencyABIsLabel>;
- extern template class ConcreteDependencyLabel<DependencyABILabelTag, DependencyABIsLabel>;
+ extern template class InstantiationPolicy<DependenciesLabel, instantiation_method::NonCopyableTag>;
extern template class ConcreteURILabel<URIMirrorsThenListedLabelTag>;
extern template class ConcreteURILabel<URIMirrorsOnlyLabelTag>;
@@ -312,29 +163,14 @@ namespace paludis
extern template class ConcreteURILabel<URILocalMirrorsOnlyLabelTag>;
extern template class ConcreteURILabel<URIManualOnlyLabelTag>;
- extern template class PrivateImplementationPattern<ConcreteURILabel<URIMirrorsThenListedLabel> >;
- extern template class PrivateImplementationPattern<ConcreteURILabel<URIMirrorsOnlyLabel> >;
- extern template class PrivateImplementationPattern<ConcreteURILabel<URIListedOnlyLabel> >;
- extern template class PrivateImplementationPattern<ConcreteURILabel<URIListedThenMirrorsLabel> >;
- extern template class PrivateImplementationPattern<ConcreteURILabel<URILocalMirrorsOnlyLabel> >;
- extern template class PrivateImplementationPattern<ConcreteURILabel<URIManualOnlyLabel> >;
-
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyHostLabelTag, DependencySystemLabel> >;
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyTargetLabelTag, DependencySystemLabel> >;
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyBuildLabelTag, DependencyTypeLabel> >;
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyRunLabelTag, DependencyTypeLabel> >;
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyPostLabelTag, DependencyTypeLabel> >;
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyInstallLabelTag, DependencyTypeLabel> >;
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyCompileLabelTag, DependencyTypeLabel> >;
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencySuggestedLabelTag, DependencySuggestLabel> >;
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyRecommendedLabelTag, DependencySuggestLabel> >;
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyRequiredLabelTag, DependencySuggestLabel> >;
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyAnyLabelTag, DependencyABIsLabel> >;
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyMineLabelTag, DependencyABIsLabel> >;
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyPrimaryLabelTag, DependencyABIsLabel> >;
- extern template class PrivateImplementationPattern<ConcreteDependencyLabel<DependencyABILabelTag, DependencyABIsLabel> >;
-
- extern template class PrivateImplementationPattern<ActiveDependencyLabels>;
+ extern template class ConcreteDependenciesLabel<DependenciesBuildLabelTag>;
+ extern template class ConcreteDependenciesLabel<DependenciesRunLabelTag>;
+ extern template class ConcreteDependenciesLabel<DependenciesPostLabelTag>;
+ extern template class ConcreteDependenciesLabel<DependenciesCompileAgainstLabelTag>;
+ extern template class ConcreteDependenciesLabel<DependenciesFetchLabelTag>;
+ extern template class ConcreteDependenciesLabel<DependenciesInstallLabelTag>;
+ extern template class ConcreteDependenciesLabel<DependenciesSuggestionLabelTag>;
+ extern template class ConcreteDependenciesLabel<DependenciesRecommendationLabelTag>;
#endif
}
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index a2cefc0..76ee6df 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -69,7 +69,7 @@
using namespace paludis;
-typedef std::list<std::tr1::shared_ptr<ActiveDependencyLabels> > LabelsStack;
+typedef std::list<std::tr1::shared_ptr<DependenciesLabelSequence> > LabelsStack;
template class Sequence<std::tr1::function<bool (const PackageID &, const Mask &)> >;
template class WrappedForwardIterator<DepListOverrideMasksFunctions::ConstIterator,
@@ -145,7 +145,7 @@ namespace paludis
current_top_level_target(0),
throw_on_blocker(o.blocks() == dl_blocks_error)
{
- labels.push_front(make_shared_ptr(new ActiveDependencyLabels(*make_shared_ptr(new DependencyLabelSequence))));
+ labels.push_front(make_shared_ptr(new DependenciesLabelSequence));
}
};
}
@@ -318,7 +318,7 @@ struct DepList::AddVisitor
void visit(const DependencySpecTree::NodeType<ConditionalDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<PackageDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<BlockDepSpec>::Type & node);
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node);
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<NamedSetDepSpec>::Type & node);
};
@@ -326,28 +326,52 @@ namespace
{
struct SuggestActiveVisitor
{
- bool result;
+ bool visit(const DependenciesBuildLabel &) const
+ {
+ return false;
+ }
+
+ bool visit(const DependenciesRunLabel &) const
+ {
+ return false;
+ }
+
+ bool visit(const DependenciesPostLabel &) const
+ {
+ return false;
+ }
- SuggestActiveVisitor() :
- result(false)
+ bool visit(const DependenciesCompileAgainstLabel &) const
{
+ return false;
}
- void visit(const DependencyRecommendedLabel &)
+ bool visit(const DependenciesFetchLabel &) const
{
- result = true;
+ return false;
}
- void visit(const DependencySuggestedLabel &)
+ bool visit(const DependenciesInstallLabel &) const
{
- result = true;
+ return false;
}
- void visit(const DependencyRequiredLabel &)
+ bool visit(const DependenciesRecommendationLabel &) const
{
+ return false;
+ }
+
+ bool visit(const DependenciesSuggestionLabel &) const
+ {
+ return true;
}
};
+ bool is_suggest_label(const std::tr1::shared_ptr<const DependenciesLabel> & l)
+ {
+ return l->accept_returning<bool>(SuggestActiveVisitor());
+ }
+
bool slot_is_same(
const PackageID & a,
const PackageID & b)
@@ -374,14 +398,9 @@ DepList::AddVisitor::visit(const DependencySpecTree::NodeType<PackageDepSpec>::T
if (only_if_not_suggested_label)
{
- SuggestActiveVisitor v;
- for (DependencySuggestLabelSequence::ConstIterator
- i((*d->_imp->labels.begin())->suggest_labels()->begin()),
- i_end((*d->_imp->labels.begin())->suggest_labels()->end()) ;
- i != i_end ; ++i)
- (*i)->accept(v);
-
- if (v.result)
+ if ((*d->_imp->labels.begin())->end() != std::find_if(((*d->_imp->labels.begin())->begin()),
+ ((*d->_imp->labels.begin())->end()),
+ is_suggest_label))
{
Log::get_instance()->message("dep_list.skipping_suggested", ll_debug, lc_context) << "Skipping dep '"
<< *node.spec() << "' because suggested label is active";
@@ -676,7 +695,7 @@ DepList::AddVisitor::visit(const DependencySpecTree::NodeType<NamedSetDepSpec>::
void
DepList::AddVisitor::visit(const DependencySpecTree::NodeType<AllDepSpec>::Type & node)
{
- d->_imp->labels.push_front(make_shared_ptr(new ActiveDependencyLabels(**d->_imp->labels.begin())));
+ d->_imp->labels.push_front(*d->_imp->labels.begin());
RunOnDestruction restore_labels(std::tr1::bind(std::tr1::mem_fn(&LabelsStack::pop_front), &d->_imp->labels));
std::for_each(indirect_iterator(node.begin()), indirect_iterator(node.end()),
@@ -688,7 +707,7 @@ DepList::AddVisitor::visit(const DependencySpecTree::NodeType<ConditionalDepSpec
{
if (d->_imp->opts->use() == dl_use_deps_standard)
{
- d->_imp->labels.push_front(make_shared_ptr(new ActiveDependencyLabels(**d->_imp->labels.begin())));
+ d->_imp->labels.push_front(*d->_imp->labels.begin());
RunOnDestruction restore_labels(std::tr1::bind(std::tr1::mem_fn(&LabelsStack::pop_front), &d->_imp->labels));
if (node.spec()->condition_met())
@@ -708,7 +727,7 @@ DepList::AddVisitor::visit(const DependencySpecTree::NodeType<AnyDepSpec>::Type
{
using namespace std::tr1::placeholders;
- d->_imp->labels.push_front(make_shared_ptr(new ActiveDependencyLabels(**d->_imp->labels.begin())));
+ d->_imp->labels.push_front(*d->_imp->labels.begin());
RunOnDestruction restore_labels(std::tr1::bind(std::tr1::mem_fn(&LabelsStack::pop_front), &d->_imp->labels));
/* annoying requirement: || ( foo? ( ... ) ) resolves to empty if !foo. */
@@ -1011,9 +1030,11 @@ DepList::AddVisitor::visit(const DependencySpecTree::NodeType<BlockDepSpec>::Typ
}
void
-DepList::AddVisitor::visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node)
+DepList::AddVisitor::visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node)
{
- d->_imp->labels.begin()->reset(new ActiveDependencyLabels(**d->_imp->labels.begin(), *node.spec()));
+ std::tr1::shared_ptr<DependenciesLabelSequence> labels(new DependenciesLabelSequence);
+ std::copy(node.spec()->begin(), node.spec()->end(), labels->back_inserter());
+ *d->_imp->labels.begin() = labels;
}
DepList::DepList(const Environment * const e, const DepListOptions & o) :
diff --git a/paludis/dep_spec-fwd.hh b/paludis/dep_spec-fwd.hh
index 792856f..60ed6dc 100644
--- a/paludis/dep_spec-fwd.hh
+++ b/paludis/dep_spec-fwd.hh
@@ -72,12 +72,12 @@ namespace paludis
typedef LabelsDepSpec<URILabel> URILabelsDepSpec;
/**
- * A DependencyLabelsDepSpec represents labels in a DependencySpecTree.
+ * A DependenciesLabelsDepSpec represents labels in a DependenciesSpecTree.
*
* \ingroup g_dep_spec
- * \since 0.26
+ * \since 0.42
*/
- typedef LabelsDepSpec<DependencyLabel> DependencyLabelsDepSpec;
+ typedef LabelsDepSpec<DependenciesLabel> DependenciesLabelsDepSpec;
class PackageDepSpecData;
class PartiallyMadePackageDepSpec;
@@ -139,12 +139,12 @@ namespace paludis
std::ostream & operator<< (std::ostream &, const URILabelsDepSpec &) PALUDIS_VISIBLE;
/**
- * A DependencyLabelsDepSpec can be written to an ostream.
+ * A DependenciesLabelsDepSpec can be written to an ostream.
*
* \ingroup g_dep_spec
- * \since 0.26
+ * \since 0.42
*/
- std::ostream & operator<< (std::ostream &, const DependencyLabelsDepSpec &) PALUDIS_VISIBLE;
+ std::ostream & operator<< (std::ostream &, const DependenciesLabelsDepSpec &) PALUDIS_VISIBLE;
/**
* A BlockDepSpec can be written to an ostream.
diff --git a/paludis/dep_spec.cc b/paludis/dep_spec.cc
index de0482f..f3b0235 100644
--- a/paludis/dep_spec.cc
+++ b/paludis/dep_spec.cc
@@ -352,21 +352,21 @@ paludis::operator<< (std::ostream & s, const ConditionalDepSpec & a)
std::ostream &
paludis::operator<< (std::ostream & s, const URILabelsDepSpec & l)
{
- s << join(indirect_iterator(l.begin()), indirect_iterator(l.end()), "+") << ":";
+ s << join(indirect_iterator(l.begin()), indirect_iterator(l.end()), ",") << ":";
return s;
}
std::ostream &
-paludis::operator<< (std::ostream & s, const PlainTextLabelDepSpec & l)
+paludis::operator<< (std::ostream & s, const DependenciesLabelsDepSpec & l)
{
- s << l.label() << ":";
+ s << join(indirect_iterator(l.begin()), indirect_iterator(l.end()), ",") << ":";
return s;
}
std::ostream &
-paludis::operator<< (std::ostream & s, const DependencyLabelsDepSpec & l)
+paludis::operator<< (std::ostream & s, const PlainTextLabelDepSpec & l)
{
- s << join(indirect_iterator(l.begin()), indirect_iterator(l.end()), ",") << ":";
+ s << l.label() << ":";
return s;
}
@@ -1282,7 +1282,7 @@ PartiallyMadePackageDepSpec::to_package_dep_spec() const
}
template class LabelsDepSpec<URILabel>;
-template class LabelsDepSpec<DependencyLabel>;
+template class LabelsDepSpec<DependenciesLabel>;
template class Sequence<std::tr1::shared_ptr<const AdditionalPackageDepSpecRequirement> >;
template class WrappedForwardIterator<AdditionalPackageDepSpecRequirements::ConstIteratorTag, const std::tr1::shared_ptr<const AdditionalPackageDepSpecRequirement> >;
@@ -1293,6 +1293,6 @@ template class CloneUsingThis<DepSpec, ConditionalDepSpec>;
template class PrivateImplementationPattern<PartiallyMadePackageDepSpec>;
template class PrivateImplementationPattern<PackageDepSpec>;
template class CloneUsingThis<DepSpec, PackageDepSpec>;
-template class PrivateImplementationPattern<DependencyLabelsDepSpec>;
template class PrivateImplementationPattern<URILabelsDepSpec>;
+template class PrivateImplementationPattern<DependenciesLabelsDepSpec>;
diff --git a/paludis/dep_spec.hh b/paludis/dep_spec.hh
index 552e5b6..2f90989 100644
--- a/paludis/dep_spec.hh
+++ b/paludis/dep_spec.hh
@@ -992,7 +992,7 @@ namespace paludis
extern template class PrivateImplementationPattern<PartiallyMadePackageDepSpec>;
extern template class PrivateImplementationPattern<PackageDepSpec>;
extern template class CloneUsingThis<DepSpec, PackageDepSpec>;
- extern template class PrivateImplementationPattern<DependencyLabelsDepSpec>;
+ extern template class PrivateImplementationPattern<DependenciesLabelsDepSpec>;
extern template class PrivateImplementationPattern<URILabelsDepSpec>;
extern template class PrivateImplementationPattern<PlainTextLabelDepSpec>;
#endif
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index b57f101..52f7e06 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -1476,7 +1476,7 @@ namespace
{
}
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
}
@@ -1658,7 +1658,7 @@ namespace
{
}
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
}
diff --git a/paludis/metadata_key.hh b/paludis/metadata_key.hh
index 79d3c90..cfa5c1a 100644
--- a/paludis/metadata_key.hh
+++ b/paludis/metadata_key.hh
@@ -424,10 +424,10 @@ namespace paludis
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
/**
- * Return a DependencyLabelSequence that represents the initial labels to use when
+ * Return a DependenciesLabelSequence that represents the initial labels to use when
* deciding the behaviour of individual items in the heirarchy.
*/
- virtual const std::tr1::shared_ptr<const DependencyLabelSequence> initial_labels() const
+ virtual const std::tr1::shared_ptr<const DependenciesLabelSequence> initial_labels() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
};
}
diff --git a/paludis/query_visitor.cc b/paludis/query_visitor.cc
index 8dff438..1c6c73e 100644
--- a/paludis/query_visitor.cc
+++ b/paludis/query_visitor.cc
@@ -205,7 +205,7 @@ QueryVisitor::visit(const DependencySpecTree::NodeType<AllDepSpec>::Type & node)
}
void
-QueryVisitor::visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+QueryVisitor::visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
// XXX implement
}
diff --git a/paludis/query_visitor.hh b/paludis/query_visitor.hh
index 56cd380..e4ce66f 100644
--- a/paludis/query_visitor.hh
+++ b/paludis/query_visitor.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -64,7 +64,7 @@ namespace paludis
void visit(const DependencySpecTree::NodeType<ConditionalDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<PackageDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<BlockDepSpec>::Type & node);
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node);
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<NamedSetDepSpec>::Type & node);
///\}
diff --git a/paludis/range_rewriter.cc b/paludis/range_rewriter.cc
index a659f94..c4ab5e8 100644
--- a/paludis/range_rewriter.cc
+++ b/paludis/range_rewriter.cc
@@ -296,7 +296,7 @@ RangeRewriter::visit(const DependencySpecTree::NodeType<BlockDepSpec>::Type &)
}
void
-RangeRewriter::visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+RangeRewriter::visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
_imp->invalid = true;
}
diff --git a/paludis/range_rewriter.hh b/paludis/range_rewriter.hh
index ddebf31..75636e6 100644
--- a/paludis/range_rewriter.hh
+++ b/paludis/range_rewriter.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -69,7 +69,7 @@ namespace paludis
void visit(const DependencySpecTree::NodeType<ConditionalDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<PackageDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<BlockDepSpec>::Type & node);
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node);
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<NamedSetDepSpec>::Type & node);
///\}
diff --git a/paludis/repositories/accounts/accounts_dep_key.cc b/paludis/repositories/accounts/accounts_dep_key.cc
index b35bd21..f976d29 100644
--- a/paludis/repositories/accounts/accounts_dep_key.cc
+++ b/paludis/repositories/accounts/accounts_dep_key.cc
@@ -40,13 +40,13 @@ namespace paludis
const Environment * const env;
const std::tr1::shared_ptr<Sequence<std::tr1::shared_ptr<PackageDepSpec> > > specs;
const std::tr1::shared_ptr<DependencySpecTree> tree;
- const std::tr1::shared_ptr<DependencyLabelSequence> initial_labels;
+ const std::tr1::shared_ptr<DependenciesLabelSequence> initial_labels;
Implementation(const Environment * const e, const std::tr1::shared_ptr<const Set<std::string> > & s) :
env(e),
specs(new Sequence<std::tr1::shared_ptr<PackageDepSpec> >),
tree(new DependencySpecTree(make_shared_ptr(new AllDepSpec))),
- initial_labels(new DependencyLabelSequence)
+ initial_labels(new DependenciesLabelSequence)
{
for (Set<std::string>::ConstIterator i(s->begin()), i_end(s->end()) ;
i != i_end ; ++i)
@@ -57,8 +57,8 @@ namespace paludis
tree->root()->append(spec);
}
- initial_labels->push_back(make_shared_ptr(new DependencyBuildLabel("build")));
- initial_labels->push_back(make_shared_ptr(new DependencyRunLabel("run")));
+ initial_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("build")));
+ initial_labels->push_back(make_shared_ptr(new DependenciesRunLabel("run")));
}
};
}
@@ -97,7 +97,7 @@ AccountsDepKey::value() const
return _imp->tree;
}
-const std::tr1::shared_ptr<const DependencyLabelSequence>
+const std::tr1::shared_ptr<const DependenciesLabelSequence>
AccountsDepKey::initial_labels() const
{
return _imp->initial_labels;
diff --git a/paludis/repositories/accounts/accounts_dep_key.hh b/paludis/repositories/accounts/accounts_dep_key.hh
index 36cf67c..520ad56 100644
--- a/paludis/repositories/accounts/accounts_dep_key.hh
+++ b/paludis/repositories/accounts/accounts_dep_key.hh
@@ -47,7 +47,7 @@ namespace paludis
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::string pretty_print_flat(const DependencySpecTree::ItemFormatter &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const std::tr1::shared_ptr<const DependencyLabelSequence> initial_labels() const
+ virtual const std::tr1::shared_ptr<const DependenciesLabelSequence> initial_labels() const
PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
diff --git a/paludis/repositories/cran/cran_package_id.cc b/paludis/repositories/cran/cran_package_id.cc
index 296e482..c99ff6b 100644
--- a/paludis/repositories/cran/cran_package_id.cc
+++ b/paludis/repositories/cran/cran_package_id.cc
@@ -72,8 +72,8 @@ namespace paludis
std::tr1::shared_ptr<DepKey> depends_key;
std::tr1::shared_ptr<DepKey> suggests_key;
- std::tr1::shared_ptr<DependencyLabelSequence> suggests_labels;
- std::tr1::shared_ptr<DependencyLabelSequence> depends_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> suggests_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> depends_labels;
Implementation(const Environment * const e,
const std::tr1::shared_ptr<const CRANRepository> & r, const FSEntry & f) :
@@ -82,12 +82,11 @@ namespace paludis
cran_repository(r),
name("cran/" + cran_name_to_internal(strip_trailing_string(f.basename(), ".DESCRIPTION"))),
version("0", VersionSpecOptions()),
- suggests_labels(new DependencyLabelSequence),
- depends_labels(new DependencyLabelSequence)
+ suggests_labels(new DependenciesLabelSequence),
+ depends_labels(new DependenciesLabelSequence)
{
- suggests_labels->push_back(make_shared_ptr(new DependencySuggestedLabel("Suggests")));
- suggests_labels->push_back(make_shared_ptr(new DependencyPostLabel("Suggests")));
- depends_labels->push_back(make_shared_ptr(new DependencyBuildLabel("Depends")));
+ suggests_labels->push_back(make_shared_ptr(new DependenciesSuggestionLabel("Suggests")));
+ depends_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("Depends")));
}
Implementation(const Environment * const e,
@@ -98,12 +97,11 @@ namespace paludis
name("cran/" + cran_name_to_internal(t)),
version(r->version()),
contained_in_key(new PackageIDKey("Contained", "Contained in", r, mkt_normal)),
- suggests_labels(new DependencyLabelSequence),
- depends_labels(new DependencyLabelSequence)
+ suggests_labels(new DependenciesLabelSequence),
+ depends_labels(new DependenciesLabelSequence)
{
- suggests_labels->push_back(make_shared_ptr(new DependencySuggestedLabel("Suggests")));
- suggests_labels->push_back(make_shared_ptr(new DependencyPostLabel("Suggests")));
- depends_labels->push_back(make_shared_ptr(new DependencyBuildLabel("Depends")));
+ suggests_labels->push_back(make_shared_ptr(new DependenciesSuggestionLabel("Suggests")));
+ depends_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("Depends")));
}
};
}
diff --git a/paludis/repositories/cran/dep_spec_pretty_printer.cc b/paludis/repositories/cran/dep_spec_pretty_printer.cc
index 3445c35..0c78bb7 100644
--- a/paludis/repositories/cran/dep_spec_pretty_printer.cc
+++ b/paludis/repositories/cran/dep_spec_pretty_printer.cc
@@ -123,7 +123,7 @@ DepSpecPrettyPrinter::visit(const DependencySpecTree::NodeType<BlockDepSpec>::Ty
}
void
-DepSpecPrettyPrinter::visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+DepSpecPrettyPrinter::visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
}
diff --git a/paludis/repositories/cran/dep_spec_pretty_printer.hh b/paludis/repositories/cran/dep_spec_pretty_printer.hh
index 12a7299..6db6d0b 100644
--- a/paludis/repositories/cran/dep_spec_pretty_printer.hh
+++ b/paludis/repositories/cran/dep_spec_pretty_printer.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -75,7 +75,7 @@ namespace paludis
void visit(const DependencySpecTree::NodeType<ConditionalDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<BlockDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<PackageDepSpec>::Type & node);
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node);
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<NamedSetDepSpec>::Type & node);
};
diff --git a/paludis/repositories/cran/keys.cc b/paludis/repositories/cran/keys.cc
index 3c6f4c2..658133a 100644
--- a/paludis/repositories/cran/keys.cc
+++ b/paludis/repositories/cran/keys.cc
@@ -147,14 +147,14 @@ namespace paludis
mutable Mutex mutex;
mutable std::tr1::shared_ptr<const DependencySpecTree> c;
- const std::tr1::shared_ptr<const DependencyLabelSequence> labels;
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> labels;
const std::string raw_name;
const std::string human_name;
const MetadataKeyType type;
Implementation(const Environment * const e, const std::string & vv,
- const std::tr1::shared_ptr<const DependencyLabelSequence> & s,
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> & s,
const std::string & r, const std::string & h, const MetadataKeyType & t) :
env(e),
v(vv),
@@ -168,7 +168,7 @@ namespace paludis
}
DepKey::DepKey(const Environment * const e, const std::string & r, const std::string & h, const std::string & v,
- const std::tr1::shared_ptr<const DependencyLabelSequence> & s, const MetadataKeyType t) :
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> & s, const MetadataKeyType t) :
PrivateImplementationPattern<DepKey>(new Implementation<DepKey>(e, v, s, r, h, t)),
_imp(PrivateImplementationPattern<DepKey>::_imp)
{
@@ -226,7 +226,7 @@ DepKey::pretty_print_flat(const DependencySpecTree::ItemFormatter & f) const
return stringify(p);
}
-const std::tr1::shared_ptr<const DependencyLabelSequence>
+const std::tr1::shared_ptr<const DependenciesLabelSequence>
DepKey::initial_labels() const
{
return _imp->labels;
diff --git a/paludis/repositories/cran/keys.hh b/paludis/repositories/cran/keys.hh
index f488579..3400f14 100644
--- a/paludis/repositories/cran/keys.hh
+++ b/paludis/repositories/cran/keys.hh
@@ -93,7 +93,7 @@ namespace paludis
public:
DepKey(const Environment * const,
const std::string &, const std::string &, const std::string &,
- const std::tr1::shared_ptr<const DependencyLabelSequence> &, const MetadataKeyType);
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> &, const MetadataKeyType);
~DepKey();
@@ -106,7 +106,7 @@ namespace paludis
virtual std::string pretty_print_flat(const DependencySpecTree::ItemFormatter &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const std::tr1::shared_ptr<const DependencyLabelSequence> initial_labels() const
+ virtual const std::tr1::shared_ptr<const DependenciesLabelSequence> initial_labels() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::string raw_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc
index e276003..4bd3c58 100644
--- a/paludis/repositories/e/dep_parser.cc
+++ b/paludis/repositories/e/dep_parser.cc
@@ -215,7 +215,7 @@ namespace
const std::string & s,
const EAPI & eapi)
{
- std::tr1::shared_ptr<DependencyLabelsDepSpec> spec(parse_dependency_label(s, eapi));
+ std::tr1::shared_ptr<DependenciesLabelsDepSpec> spec(parse_dependency_label(s, eapi));
h.begin()->item()->append(spec);
annotations_go_here(spec);
}
@@ -667,7 +667,7 @@ paludis::erepository::parse_plain_text_label(const std::string & s)
return make_shared_ptr(new PlainTextLabelDepSpec(s));
}
-std::tr1::shared_ptr<DependencyLabelsDepSpec>
+std::tr1::shared_ptr<DependenciesLabelsDepSpec>
paludis::erepository::parse_dependency_label(const std::string & s, const EAPI & e)
{
Context context("When parsing label string '" + s + "' using EAPI '" + e.name() + "':");
@@ -679,7 +679,7 @@ paludis::erepository::parse_dependency_label(const std::string & s, const EAPI &
std::string label(s.substr(0, s.length() - 1));
tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(label, ",+", "", std::inserter(labels, labels.end()));
- std::tr1::shared_ptr<DependencyLabelsDepSpec> l(new DependencyLabelsDepSpec);
+ std::tr1::shared_ptr<DependenciesLabelsDepSpec> l(new DependenciesLabelsDepSpec);
for (std::set<std::string>::iterator it = labels.begin(), it_e = labels.end(); it != it_e; ++it)
{
@@ -687,34 +687,22 @@ paludis::erepository::parse_dependency_label(const std::string & s, const EAPI &
if (c.empty())
throw EDepParseError(s, "Unknown label '" + *it + "'");
- if (c == "DependencyHostLabel")
- l->add_label(make_shared_ptr(new DependencyHostLabel(*it)));
- else if (c == "DependencyTargetLabel")
- l->add_label(make_shared_ptr(new DependencyTargetLabel(*it)));
- else if (c == "DependencyBuildLabel")
- l->add_label(make_shared_ptr(new DependencyBuildLabel(*it)));
- else if (c == "DependencyRunLabel")
- l->add_label(make_shared_ptr(new DependencyRunLabel(*it)));
- else if (c == "DependencyPostLabel")
- l->add_label(make_shared_ptr(new DependencyPostLabel(*it)));
- else if (c == "DependencyInstallLabel")
- l->add_label(make_shared_ptr(new DependencyInstallLabel(*it)));
- else if (c == "DependencyCompileLabel")
- l->add_label(make_shared_ptr(new DependencyCompileLabel(*it)));
- else if (c == "DependencySuggestedLabel")
- l->add_label(make_shared_ptr(new DependencySuggestedLabel(*it)));
- else if (c == "DependencyRecommendedLabel")
- l->add_label(make_shared_ptr(new DependencyRecommendedLabel(*it)));
- else if (c == "DependencyRequiredLabel")
- l->add_label(make_shared_ptr(new DependencyRequiredLabel(*it)));
- else if (c == "DependencyAnyLabel")
- l->add_label(make_shared_ptr(new DependencyAnyLabel(*it)));
- else if (c == "DependencyMineLabel")
- l->add_label(make_shared_ptr(new DependencyMineLabel(*it)));
- else if (c == "DependencyPrimaryLabel")
- l->add_label(make_shared_ptr(new DependencyPrimaryLabel(*it)));
- else if (c == "DependencyABILabel")
- l->add_label(make_shared_ptr(new DependencyABILabel(*it)));
+ if (c == "DependenciesBuildLabel")
+ l->add_label(make_shared_ptr(new DependenciesBuildLabel(*it)));
+ else if (c == "DependenciesRunLabel")
+ l->add_label(make_shared_ptr(new DependenciesRunLabel(*it)));
+ else if (c == "DependenciesPostLabel")
+ l->add_label(make_shared_ptr(new DependenciesPostLabel(*it)));
+ else if (c == "DependenciesInstallLabel")
+ l->add_label(make_shared_ptr(new DependenciesInstallLabel(*it)));
+ else if (c == "DependenciesCompileAgainstLabel")
+ l->add_label(make_shared_ptr(new DependenciesCompileAgainstLabel(*it)));
+ else if (c == "DependenciesFetchLabel")
+ l->add_label(make_shared_ptr(new DependenciesFetchLabel(*it)));
+ else if (c == "DependenciesSuggestionLabel")
+ l->add_label(make_shared_ptr(new DependenciesSuggestionLabel(*it)));
+ else if (c == "DependenciesRecommendationLabel")
+ l->add_label(make_shared_ptr(new DependenciesRecommendationLabel(*it)));
else
throw EDepParseError(s, "Label '" + *it + "' maps to unknown class '" + c + "'");
}
diff --git a/paludis/repositories/e/dep_parser.hh b/paludis/repositories/e/dep_parser.hh
index 3cc09af..c27cd24 100644
--- a/paludis/repositories/e/dep_parser.hh
+++ b/paludis/repositories/e/dep_parser.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -59,7 +59,7 @@ namespace paludis
/**
* Parse a dep spec label.
*/
- std::tr1::shared_ptr<DependencyLabelsDepSpec> parse_dependency_label(const std::string & s, const EAPI &) PALUDIS_VISIBLE;
+ std::tr1::shared_ptr<DependenciesLabelsDepSpec> parse_dependency_label(const std::string & s, const EAPI &) PALUDIS_VISIBLE;
/**
* Parse a provide heirarchy.
diff --git a/paludis/repositories/e/dep_spec_pretty_printer.cc b/paludis/repositories/e/dep_spec_pretty_printer.cc
index c68dc71..76ff0e4 100644
--- a/paludis/repositories/e/dep_spec_pretty_printer.cc
+++ b/paludis/repositories/e/dep_spec_pretty_printer.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -152,7 +152,7 @@ namespace
result = true;
}
- void visit(const GenericSpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+ void visit(const GenericSpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
result = true;
}
@@ -514,7 +514,7 @@ DepSpecPrettyPrinter::visit(const GenericSpecTree::NodeType<PlainTextLabelDepSpe
}
void
-DepSpecPrettyPrinter::visit(const GenericSpecTree::NodeType<DependencyLabelsDepSpec>::Type & node)
+DepSpecPrettyPrinter::visit(const GenericSpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node)
{
if (_imp->extra_label_indent)
{
diff --git a/paludis/repositories/e/dep_spec_pretty_printer.hh b/paludis/repositories/e/dep_spec_pretty_printer.hh
index 6a60c56..fcf4784 100644
--- a/paludis/repositories/e/dep_spec_pretty_printer.hh
+++ b/paludis/repositories/e/dep_spec_pretty_printer.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -96,7 +96,7 @@ namespace paludis
void visit(const GenericSpecTree::NodeType<ConditionalDepSpec>::Type & node);
void visit(const GenericSpecTree::NodeType<PackageDepSpec>::Type & node);
void visit(const GenericSpecTree::NodeType<BlockDepSpec>::Type & node);
- void visit(const GenericSpecTree::NodeType<DependencyLabelsDepSpec>::Type & node);
+ void visit(const GenericSpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node);
void visit(const GenericSpecTree::NodeType<NamedSetDepSpec>::Type & node);
void visit(const GenericSpecTree::NodeType<SimpleURIDepSpec>::Type & node);
void visit(const GenericSpecTree::NodeType<FetchableURIDepSpec>::Type & node);
diff --git a/paludis/repositories/e/dependencies_rewriter.cc b/paludis/repositories/e/dependencies_rewriter.cc
index 65c6e82..6ce507e 100644
--- a/paludis/repositories/e/dependencies_rewriter.cc
+++ b/paludis/repositories/e/dependencies_rewriter.cc
@@ -33,7 +33,7 @@
using namespace paludis;
using namespace paludis::erepository;
-typedef std::list<std::tr1::shared_ptr<ActiveDependencyLabels> > LabelsStack;
+typedef std::list<std::tr1::shared_ptr<DependenciesLabelSequence> > LabelsStack;
namespace
{
@@ -67,15 +67,15 @@ namespace paludis
std::string rdepend;
std::string pdepend;
- std::tr1::shared_ptr<DependencyLabelSequence> default_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> default_labels;
LabelsStack labels;
Implementation() :
- default_labels(new DependencyLabelSequence)
+ default_labels(new DependenciesLabelSequence)
{
- default_labels->push_back(make_shared_ptr(new DependencyBuildLabel("build")));
- default_labels->push_back(make_shared_ptr(new DependencyRunLabel("run")));
- labels.push_front(make_shared_ptr(new ActiveDependencyLabels(*default_labels)));
+ default_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("build")));
+ default_labels->push_back(make_shared_ptr(new DependenciesRunLabel("run")));
+ labels.push_front(default_labels);
}
};
}
@@ -126,19 +126,21 @@ DependenciesRewriter::visit(const DependencySpecTree::NodeType<BlockDepSpec>::Ty
}
void
-DependenciesRewriter::visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node)
+DependenciesRewriter::visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node)
{
_imp->depend.append(" " + stringify(*node.spec()) + get_annotations(*node.spec()));
_imp->rdepend.append(" " + stringify(*node.spec()) + get_annotations(*node.spec()));
_imp->pdepend.append(" " + stringify(*node.spec()) + get_annotations(*node.spec()));
- _imp->labels.begin()->reset(new ActiveDependencyLabels(**_imp->labels.begin(), *node.spec()));
+ std::tr1::shared_ptr<DependenciesLabelSequence> labels(new DependenciesLabelSequence);
+ std::copy(node.spec()->begin(), node.spec()->end(), labels->back_inserter());
+ *_imp->labels.begin() = labels;
}
void
DependenciesRewriter::visit(const DependencySpecTree::NodeType<AllDepSpec>::Type & node)
{
- _imp->labels.push_front(make_shared_ptr(new ActiveDependencyLabels(**_imp->labels.begin())));
+ _imp->labels.push_front(*_imp->labels.begin());
RunOnDestruction restore_labels(std::tr1::bind(std::tr1::mem_fn(&LabelsStack::pop_front), &_imp->labels));
std::string d(_imp->depend), r(_imp->rdepend), p(_imp->pdepend);
@@ -156,7 +158,7 @@ DependenciesRewriter::visit(const DependencySpecTree::NodeType<AllDepSpec>::Type
void
DependenciesRewriter::visit(const DependencySpecTree::NodeType<AnyDepSpec>::Type & node)
{
- _imp->labels.push_front(make_shared_ptr(new ActiveDependencyLabels(**_imp->labels.begin())));
+ _imp->labels.push_front(*_imp->labels.begin());
RunOnDestruction restore_labels(std::tr1::bind(std::tr1::mem_fn(&LabelsStack::pop_front), &_imp->labels));
std::string d(_imp->depend), r(_imp->rdepend), p(_imp->pdepend);
@@ -174,7 +176,7 @@ DependenciesRewriter::visit(const DependencySpecTree::NodeType<AnyDepSpec>::Type
void
DependenciesRewriter::visit(const DependencySpecTree::NodeType<ConditionalDepSpec>::Type & node)
{
- _imp->labels.push_front(make_shared_ptr(new ActiveDependencyLabels(**_imp->labels.begin())));
+ _imp->labels.push_front(*_imp->labels.begin());
RunOnDestruction restore_labels(std::tr1::bind(std::tr1::mem_fn(&LabelsStack::pop_front), &_imp->labels));
std::string d(_imp->depend), r(_imp->rdepend), p(_imp->pdepend);
@@ -207,27 +209,42 @@ namespace
{
}
- void visit(const DependencyRunLabel &)
+ void visit(const DependenciesRunLabel &)
{
r.append(" " + s + get_annotations(a));
}
- void visit(const DependencyPostLabel &)
+ void visit(const DependenciesPostLabel &)
{
p.append(" " + s + get_annotations(a));
}
- void visit(const DependencyBuildLabel &)
+ void visit(const DependenciesSuggestionLabel &)
+ {
+ p.append(" " + s + get_annotations(a));
+ }
+
+ void visit(const DependenciesRecommendationLabel &)
+ {
+ p.append(" " + s + get_annotations(a));
+ }
+
+ void visit(const DependenciesBuildLabel &)
+ {
+ d.append(" " + s + get_annotations(a));
+ }
+
+ void visit(const DependenciesFetchLabel &)
{
d.append(" " + s + get_annotations(a));
}
- void visit(const DependencyCompileLabel &)
+ void visit(const DependenciesCompileAgainstLabel &)
{
r.append(" " + s + get_annotations(a));
}
- void visit(const DependencyInstallLabel &)
+ void visit(const DependenciesInstallLabel &)
{
d.append(" " + s + get_annotations(a));
}
@@ -239,8 +256,8 @@ DependenciesRewriter::_add_where_necessary(const std::string & s, const DepSpec
{
AddWhereNecessary v(_imp->depend, _imp->rdepend, _imp->pdepend, s, a);
std::for_each(
- indirect_iterator((*_imp->labels.begin())->type_labels()->begin()),
- indirect_iterator((*_imp->labels.begin())->type_labels()->end()),
+ indirect_iterator((*_imp->labels.begin())->begin()),
+ indirect_iterator((*_imp->labels.begin())->end()),
accept_visitor(v));
}
diff --git a/paludis/repositories/e/dependencies_rewriter.hh b/paludis/repositories/e/dependencies_rewriter.hh
index 9fb20bd..a501825 100644
--- a/paludis/repositories/e/dependencies_rewriter.hh
+++ b/paludis/repositories/e/dependencies_rewriter.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -40,7 +40,7 @@ namespace paludis
void visit(const DependencySpecTree::NodeType<PackageDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<NamedSetDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<BlockDepSpec>::Type & node);
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node);
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<AllDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<AnyDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<ConditionalDepSpec>::Type & node);
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index 966a053..79e8470 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -120,10 +120,10 @@ namespace paludis
std::tr1::shared_ptr<const MetadataValueKey<std::string> > pkgmanager;
std::tr1::shared_ptr<const MetadataValueKey<std::string> > vdb_format;
- std::tr1::shared_ptr<DependencyLabelSequence> raw_dependencies_labels;
- std::tr1::shared_ptr<DependencyLabelSequence> build_dependencies_labels;
- std::tr1::shared_ptr<DependencyLabelSequence> run_dependencies_labels;
- std::tr1::shared_ptr<DependencyLabelSequence> post_dependencies_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> raw_dependencies_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> build_dependencies_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> run_dependencies_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> post_dependencies_labels;
Implementation(const QualifiedPackageName & q, const VersionSpec & v,
const Environment * const e,
@@ -134,17 +134,17 @@ namespace paludis
repository(r),
dir(f),
has_keys(false),
- raw_dependencies_labels(new DependencyLabelSequence),
- build_dependencies_labels(new DependencyLabelSequence),
- run_dependencies_labels(new DependencyLabelSequence),
- post_dependencies_labels(new DependencyLabelSequence)
+ raw_dependencies_labels(new DependenciesLabelSequence),
+ build_dependencies_labels(new DependenciesLabelSequence),
+ run_dependencies_labels(new DependenciesLabelSequence),
+ post_dependencies_labels(new DependenciesLabelSequence)
{
- raw_dependencies_labels->push_back(make_shared_ptr(new DependencyBuildLabel("build")));
- raw_dependencies_labels->push_back(make_shared_ptr(new DependencyRunLabel("run")));
+ raw_dependencies_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("build")));
+ raw_dependencies_labels->push_back(make_shared_ptr(new DependenciesRunLabel("run")));
- build_dependencies_labels->push_back(make_shared_ptr(new DependencyBuildLabel("DEPEND")));
- run_dependencies_labels->push_back(make_shared_ptr(new DependencyRunLabel("RDEPEND")));
- post_dependencies_labels->push_back(make_shared_ptr(new DependencyPostLabel("PDEPEND")));
+ build_dependencies_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("DEPEND")));
+ run_dependencies_labels->push_back(make_shared_ptr(new DependenciesRunLabel("RDEPEND")));
+ post_dependencies_labels->push_back(make_shared_ptr(new DependenciesPostLabel("PDEPEND")));
}
};
}
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc
index 38fdb5a..244b4dc 100644
--- a/paludis/repositories/e/e_key.cc
+++ b/paludis/repositories/e/e_key.cc
@@ -110,7 +110,7 @@ namespace paludis
const std::string string_value;
mutable Mutex value_mutex;
mutable std::tr1::shared_ptr<const DependencySpecTree> value;
- const std::tr1::shared_ptr<const DependencyLabelSequence> labels;
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> labels;
const std::string raw_name;
const std::string human_name;
@@ -119,7 +119,7 @@ namespace paludis
Implementation(
const Environment * const e,
const std::tr1::shared_ptr<const ERepositoryID> & i, const std::string & v,
- const std::tr1::shared_ptr<const DependencyLabelSequence> & s,
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> & s,
const std::string & r, const std::string & h, const MetadataKeyType & t) :
env(e),
id(i),
@@ -137,7 +137,7 @@ EDependenciesKey::EDependenciesKey(
const Environment * const e,
const std::tr1::shared_ptr<const ERepositoryID> & id,
const std::string & r, const std::string & h, const std::string & v,
- const std::tr1::shared_ptr<const DependencyLabelSequence> & l, const MetadataKeyType t) :
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> & l, const MetadataKeyType t) :
PrivateImplementationPattern<EDependenciesKey>(new Implementation<EDependenciesKey>(e, id, v, l, r, h, t))
{
}
@@ -158,7 +158,7 @@ EDependenciesKey::value() const
return _imp->value;
}
-const std::tr1::shared_ptr<const DependencyLabelSequence>
+const std::tr1::shared_ptr<const DependenciesLabelSequence>
EDependenciesKey::initial_labels() const
{
return _imp->labels;
diff --git a/paludis/repositories/e/e_key.hh b/paludis/repositories/e/e_key.hh
index 03c7b1e..0d76229 100644
--- a/paludis/repositories/e/e_key.hh
+++ b/paludis/repositories/e/e_key.hh
@@ -67,7 +67,7 @@ namespace paludis
const Environment * const,
const std::tr1::shared_ptr<const ERepositoryID> &,
const std::string &, const std::string &, const std::string &,
- const std::tr1::shared_ptr<const DependencyLabelSequence> &,
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> &,
const MetadataKeyType);
~EDependenciesKey();
@@ -80,7 +80,7 @@ namespace paludis
virtual std::string pretty_print_flat(const DependencySpecTree::ItemFormatter &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const std::tr1::shared_ptr<const DependencyLabelSequence> initial_labels() const
+ virtual const std::tr1::shared_ptr<const DependenciesLabelSequence> initial_labels() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::string raw_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 92ac4aa..c0ae338 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -2564,17 +2564,17 @@ namespace test_cases
erepository::DepSpecPrettyPrinter pd(0, std::tr1::shared_ptr<const PackageID>(), ff, 0, false, false);
TEST_CHECK(id->build_dependencies_key());
id->build_dependencies_key()->value()->root()->accept(pd);
- TEST_CHECK_STRINGIFY_EQUAL(pd, "( cat/pkg1 build: cat/pkg2 build,run: cat/pkg3 suggested: cat/pkg4 post: )");
+ TEST_CHECK_STRINGIFY_EQUAL(pd, "( cat/pkg1 build: cat/pkg2 build,run: cat/pkg3 suggestion: post: )");
erepository::DepSpecPrettyPrinter pr(0, std::tr1::shared_ptr<const PackageID>(), ff, 0, false, false);
TEST_CHECK(id->run_dependencies_key());
id->run_dependencies_key()->value()->root()->accept(pr);
- TEST_CHECK_STRINGIFY_EQUAL(pr, "( cat/pkg1 build: build,run: cat/pkg3 suggested: cat/pkg4 post: )");
+ TEST_CHECK_STRINGIFY_EQUAL(pr, "( cat/pkg1 build: build,run: cat/pkg3 suggestion: post: )");
erepository::DepSpecPrettyPrinter pp(0, std::tr1::shared_ptr<const PackageID>(), ff, 0, false, false);
TEST_CHECK(id->post_dependencies_key());
id->post_dependencies_key()->value()->root()->accept(pp);
- TEST_CHECK_STRINGIFY_EQUAL(pp, "( build: build,run: suggested: post: cat/pkg5 )");
+ TEST_CHECK_STRINGIFY_EQUAL(pp, "( build: build,run: suggestion: cat/pkg4 post: cat/pkg5 )");
}
} test_e_repository_dependencies_rewriter;
diff --git a/paludis/repositories/e/e_repository_TEST_setup.sh b/paludis/repositories/e/e_repository_TEST_setup.sh
index 80eac11..731300e 100755
--- a/paludis/repositories/e/e_repository_TEST_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_setup.sh
@@ -2767,7 +2767,7 @@ cat <<END > category/package/package-1.ebuild || exit 1
EAPI="exheres-0"
SLOT="0"
PLATFORMS="test"
-DEPENDENCIES="cat/pkg1 build: cat/pkg2 build,run: cat/pkg3 suggested: cat/pkg4 post: cat/pkg5"
+DEPENDENCIES="cat/pkg1 build: cat/pkg2 build,run: cat/pkg3 suggestion: cat/pkg4 post: cat/pkg5"
END
cd ..
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index 8ac1115..948d020 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -298,17 +298,14 @@ uri_labels = \
manual = URIManualOnlyLabel
dependency_labels = \
- host = DependencyHostLabel ; \
- target = DependencyTargetLabel ; \
- build = DependencyBuildLabel ; \
- run = DependencyRunLabel ; \
- post = DependencyPostLabel; \
- install = DependencyInstallLabel ; \
- compile-against = DependencyCompileLabel ; \
- suggested = DependencySuggestedLabel ; \
- recommended = DependencyRecommendedLabel ; \
- required = DependencyRequiredLabel ; \
- @ = DependencyABILabel
+ build = DependenciesBuildLabel ; \
+ run = DependenciesRunLabel ; \
+ post = DependenciesPostLabel ; \
+ install = DependenciesInstallLabel ; \
+ compile-against = DependenciesCompileAgainstLabel ; \
+ fetch = DependenciesFetchLabel ; \
+ recommendation = DependenciesRecommendationLabel ; \
+ suggestion = DependenciesSuggestionLabel
restrict_mirror = mirror
restrict_fetch = fetch
diff --git a/paludis/repositories/e/eapis/kdebuild-1.conf b/paludis/repositories/e/eapis/kdebuild-1.conf
index 82bb762..313cc9c 100644
--- a/paludis/repositories/e/eapis/kdebuild-1.conf
+++ b/paludis/repositories/e/eapis/kdebuild-1.conf
@@ -55,8 +55,8 @@ uri_labels = \
manual = URIManualOnlyLabel
dependency_labels = \
- suggested = DependencySuggestedLabel ; \
- required = DependencyRequiredLabel ;
+ suggested = DependenciesSuggestionLabel ; \
+ required = DependenciesPostLabel ;
dosym_mkdir = false
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index f75d5d9..370249a 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -111,10 +111,10 @@ namespace paludis
mutable std::tr1::shared_ptr<const EChoicesKey> choices;
mutable std::tr1::shared_ptr<const EStringSetKey> defined_phases;
- std::tr1::shared_ptr<DependencyLabelSequence> raw_dependencies_labels;
- std::tr1::shared_ptr<DependencyLabelSequence> build_dependencies_labels;
- std::tr1::shared_ptr<DependencyLabelSequence> run_dependencies_labels;
- std::tr1::shared_ptr<DependencyLabelSequence> post_dependencies_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> raw_dependencies_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> build_dependencies_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> run_dependencies_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> post_dependencies_labels;
Implementation(const QualifiedPackageName & q, const VersionSpec & v,
const Environment * const e,
@@ -130,17 +130,17 @@ namespace paludis
eclass_mtimes(m),
has_keys(false),
has_masks(false),
- raw_dependencies_labels(new DependencyLabelSequence),
- build_dependencies_labels(new DependencyLabelSequence),
- run_dependencies_labels(new DependencyLabelSequence),
- post_dependencies_labels(new DependencyLabelSequence)
+ raw_dependencies_labels(new DependenciesLabelSequence),
+ build_dependencies_labels(new DependenciesLabelSequence),
+ run_dependencies_labels(new DependenciesLabelSequence),
+ post_dependencies_labels(new DependenciesLabelSequence)
{
- raw_dependencies_labels->push_back(make_shared_ptr(new DependencyBuildLabel("build")));
- raw_dependencies_labels->push_back(make_shared_ptr(new DependencyRunLabel("run")));
+ raw_dependencies_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("build")));
+ raw_dependencies_labels->push_back(make_shared_ptr(new DependenciesRunLabel("run")));
- build_dependencies_labels->push_back(make_shared_ptr(new DependencyBuildLabel("DEPEND")));
- run_dependencies_labels->push_back(make_shared_ptr(new DependencyRunLabel("RDEPEND")));
- post_dependencies_labels->push_back(make_shared_ptr(new DependencyPostLabel("PDEPEND")));
+ build_dependencies_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("DEPEND")));
+ run_dependencies_labels->push_back(make_shared_ptr(new DependenciesRunLabel("RDEPEND")));
+ post_dependencies_labels->push_back(make_shared_ptr(new DependenciesPostLabel("PDEPEND")));
}
};
}
diff --git a/paludis/repositories/e/fix_locked_dependencies.cc b/paludis/repositories/e/fix_locked_dependencies.cc
index 5fc969d..9a4c820 100644
--- a/paludis/repositories/e/fix_locked_dependencies.cc
+++ b/paludis/repositories/e/fix_locked_dependencies.cc
@@ -135,7 +135,7 @@ namespace
(*stack.begin())->append(node.spec());
}
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node)
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node)
{
(*stack.begin())->append(node.spec());
}
diff --git a/paludis/repositories/e/qa/extractors.cc b/paludis/repositories/e/qa/extractors.cc
index e7c9ee2..71f211b 100644
--- a/paludis/repositories/e/qa/extractors.cc
+++ b/paludis/repositories/e/qa/extractors.cc
@@ -113,7 +113,7 @@ namespace
{
}
- void visit(const GenericSpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+ void visit(const GenericSpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
}
@@ -222,7 +222,7 @@ namespace
{
}
- void visit(const GenericSpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+ void visit(const GenericSpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
}
diff --git a/paludis/repositories/e/qa/spec_keys.cc b/paludis/repositories/e/qa/spec_keys.cc
index 8a1d58e..8056206 100644
--- a/paludis/repositories/e/qa/spec_keys.cc
+++ b/paludis/repositories/e/qa/spec_keys.cc
@@ -162,7 +162,7 @@ namespace
{
}
- void visit(const GenericSpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+ void visit(const GenericSpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
}
diff --git a/paludis/repositories/e/qa/visibility.cc b/paludis/repositories/e/qa/visibility.cc
index b14ffdb..2b82d0b 100644
--- a/paludis/repositories/e/qa/visibility.cc
+++ b/paludis/repositories/e/qa/visibility.cc
@@ -95,7 +95,7 @@ namespace
viable = true;
}
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
}
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index 755415d..3ce34fa 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -283,17 +283,17 @@ namespace test_cases
erepository::DepSpecPrettyPrinter pd(0, std::tr1::shared_ptr<const PackageID>(), ff, 0, false, false);
TEST_CHECK(id->build_dependencies_key());
id->build_dependencies_key()->value()->root()->accept(pd);
- TEST_CHECK_STRINGIFY_EQUAL(pd, "( cat/pkg1 build: cat/pkg2 build,run: cat/pkg3 suggested: cat/pkg4 post: )");
+ TEST_CHECK_STRINGIFY_EQUAL(pd, "( cat/pkg1 build: cat/pkg2 build,run: cat/pkg3 suggestion: post: )");
erepository::DepSpecPrettyPrinter pr(0, std::tr1::shared_ptr<const PackageID>(), ff, 0, false, false);
TEST_CHECK(id->run_dependencies_key());
id->run_dependencies_key()->value()->root()->accept(pr);
- TEST_CHECK_STRINGIFY_EQUAL(pr, "( cat/pkg1 build: build,run: cat/pkg3 suggested: cat/pkg4 post: )");
+ TEST_CHECK_STRINGIFY_EQUAL(pr, "( cat/pkg1 build: build,run: cat/pkg3 suggestion: post: )");
erepository::DepSpecPrettyPrinter pp(0, std::tr1::shared_ptr<const PackageID>(), ff, 0, false, false);
TEST_CHECK(id->post_dependencies_key());
id->post_dependencies_key()->value()->root()->accept(pp);
- TEST_CHECK_STRINGIFY_EQUAL(pp, "( build: build,run: suggested: post: cat/pkg5 )");
+ TEST_CHECK_STRINGIFY_EQUAL(pp, "( build: build,run: suggestion: cat/pkg4 post: cat/pkg5 )");
}
} test_vdb_repository_dependencies_rewriter;
diff --git a/paludis/repositories/e/vdb_repository_TEST_setup.sh b/paludis/repositories/e/vdb_repository_TEST_setup.sh
index 76ad7ff..0c647c7 100755
--- a/paludis/repositories/e/vdb_repository_TEST_setup.sh
+++ b/paludis/repositories/e/vdb_repository_TEST_setup.sh
@@ -80,7 +80,7 @@ echo -n "cat-one/oink" >> world-no-match-no-eol
mkdir -p repo2/category/package-1 || exit 1
echo "exheres-0" >repo2/category/package-1/EAPI
echo "0" >repo2/category/package-1/SLOT
-echo "cat/pkg1 build: cat/pkg2 build,run: cat/pkg3 suggested: cat/pkg4 post: cat/pkg5" >repo2/category/package-1/DEPENDENCIES
+echo "cat/pkg1 build: cat/pkg2 build,run: cat/pkg3 suggestion: cat/pkg4 post: cat/pkg5" >repo2/category/package-1/DEPENDENCIES
mkdir -p repo3
diff --git a/paludis/repositories/fake/dep_parser_TEST.cc b/paludis/repositories/fake/dep_parser_TEST.cc
index 85a7f0c..0842e38 100644
--- a/paludis/repositories/fake/dep_parser_TEST.cc
+++ b/paludis/repositories/fake/dep_parser_TEST.cc
@@ -48,7 +48,7 @@ namespace
str << "b<" << stringify(*node.spec()) << ">";
}
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node)
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node)
{
str << "l<" << stringify(*node.spec()) << ">";
}
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index 19be96b..802ac67 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -187,14 +187,14 @@ namespace paludis
std::tr1::shared_ptr<const DependencySpecTree> value;
std::string string_value;
const std::tr1::function<const std::tr1::shared_ptr<const DependencySpecTree> (const std::string &)> func;
- std::tr1::shared_ptr<const DependencyLabelSequence> labels;
+ std::tr1::shared_ptr<const DependenciesLabelSequence> labels;
const std::string raw_name;
const std::string human_name;
const MetadataKeyType type;
Implementation(const std::tr1::function<const std::tr1::shared_ptr<const DependencySpecTree> (const std::string &)> & f,
- const std::tr1::shared_ptr<const DependencyLabelSequence> & s,
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> & s,
const std::string & r, const std::string & h, const MetadataKeyType t) :
func(f),
labels(s),
@@ -334,7 +334,7 @@ FakeMetadataSpecTreeKey<FetchableURISpecTree>::initial_label() const
FakeMetadataSpecTreeKey<DependencySpecTree>::FakeMetadataSpecTreeKey(const std::string & r, const std::string & h, const std::string & v,
const std::tr1::function<const std::tr1::shared_ptr<const DependencySpecTree> (const std::string &)> & f,
- const std::tr1::shared_ptr<const DependencyLabelSequence> & s, const MetadataKeyType t) :
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> & s, const MetadataKeyType t) :
PrivateImplementationPattern<FakeMetadataSpecTreeKey<DependencySpecTree> >(
new Implementation<FakeMetadataSpecTreeKey<DependencySpecTree> >(f, s, r, h, t)),
_imp(PrivateImplementationPattern<FakeMetadataSpecTreeKey<DependencySpecTree> >::_imp)
@@ -371,7 +371,7 @@ FakeMetadataSpecTreeKey<DependencySpecTree>::pretty_print_flat(const DependencyS
return _imp->string_value;
}
-const std::tr1::shared_ptr<const DependencyLabelSequence>
+const std::tr1::shared_ptr<const DependenciesLabelSequence>
FakeMetadataSpecTreeKey<DependencySpecTree>::initial_labels() const
{
return _imp->labels;
@@ -620,10 +620,10 @@ namespace paludis
const QualifiedPackageName name;
const VersionSpec version;
- mutable std::tr1::shared_ptr<DependencyLabelSequence> build_dependencies_labels;
- mutable std::tr1::shared_ptr<DependencyLabelSequence> run_dependencies_labels;
- mutable std::tr1::shared_ptr<DependencyLabelSequence> post_dependencies_labels;
- mutable std::tr1::shared_ptr<DependencyLabelSequence> suggested_dependencies_labels;
+ mutable std::tr1::shared_ptr<DependenciesLabelSequence> build_dependencies_labels;
+ mutable std::tr1::shared_ptr<DependenciesLabelSequence> run_dependencies_labels;
+ mutable std::tr1::shared_ptr<DependenciesLabelSequence> post_dependencies_labels;
+ mutable std::tr1::shared_ptr<DependenciesLabelSequence> suggested_dependencies_labels;
std::tr1::shared_ptr<LiteralMetadataValueKey<SlotName> > slot;
std::tr1::shared_ptr<LiteralMetadataValueKey<std::tr1::shared_ptr<const PackageID> > > package_id;
@@ -649,19 +649,18 @@ namespace paludis
repository(r),
name(q),
version(v),
- build_dependencies_labels(new DependencyLabelSequence),
- run_dependencies_labels(new DependencyLabelSequence),
- post_dependencies_labels(new DependencyLabelSequence),
- suggested_dependencies_labels(new DependencyLabelSequence),
+ build_dependencies_labels(new DependenciesLabelSequence),
+ run_dependencies_labels(new DependenciesLabelSequence),
+ post_dependencies_labels(new DependenciesLabelSequence),
+ suggested_dependencies_labels(new DependenciesLabelSequence),
slot(new LiteralMetadataValueKey<SlotName>("SLOT", "Slot", mkt_internal, SlotName("0"))),
keywords(new FakeMetadataKeywordSetKey("KEYWORDS", "Keywords", "test", mkt_normal, id, env)),
has_masks(false)
{
- build_dependencies_labels->push_back(make_shared_ptr(new DependencyBuildLabel("DEPEND")));
- run_dependencies_labels->push_back(make_shared_ptr(new DependencyRunLabel("RDEPEND")));
- post_dependencies_labels->push_back(make_shared_ptr(new DependencyPostLabel("PDEPEND")));
- suggested_dependencies_labels->push_back(make_shared_ptr(new DependencySuggestedLabel("SDEPEND")));
- suggested_dependencies_labels->push_back(make_shared_ptr(new DependencyPostLabel("SDEPEND")));
+ build_dependencies_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("DEPEND")));
+ run_dependencies_labels->push_back(make_shared_ptr(new DependenciesRunLabel("RDEPEND")));
+ post_dependencies_labels->push_back(make_shared_ptr(new DependenciesPostLabel("PDEPEND")));
+ suggested_dependencies_labels->push_back(make_shared_ptr(new DependenciesSuggestionLabel("SDEPEND")));
}
};
}
diff --git a/paludis/repositories/fake/fake_package_id.hh b/paludis/repositories/fake/fake_package_id.hh
index 949c42d..4389261 100644
--- a/paludis/repositories/fake/fake_package_id.hh
+++ b/paludis/repositories/fake/fake_package_id.hh
@@ -137,7 +137,7 @@ namespace paludis
public:
FakeMetadataSpecTreeKey(const std::string &, const std::string &, const std::string &,
const std::tr1::function<const std::tr1::shared_ptr<const DependencySpecTree> (const std::string &)> &,
- const std::tr1::shared_ptr<const DependencyLabelSequence> &,
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> &,
const MetadataKeyType);
~FakeMetadataSpecTreeKey();
@@ -152,7 +152,7 @@ namespace paludis
virtual std::string pretty_print_flat(const DependencySpecTree::ItemFormatter &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const std::tr1::shared_ptr<const DependencyLabelSequence> initial_labels() const
+ virtual const std::tr1::shared_ptr<const DependenciesLabelSequence> initial_labels() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::string raw_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/unpackaged/dep_printer.cc b/paludis/repositories/unpackaged/dep_printer.cc
index 292a83b..04535ec 100644
--- a/paludis/repositories/unpackaged/dep_printer.cc
+++ b/paludis/repositories/unpackaged/dep_printer.cc
@@ -103,7 +103,7 @@ DepPrinter::visit(const DependencySpecTree::NodeType<BlockDepSpec>::Type &)
}
void
-DepPrinter::visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+DepPrinter::visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
}
diff --git a/paludis/repositories/unpackaged/dep_printer.hh b/paludis/repositories/unpackaged/dep_printer.hh
index 56ff208..2de14c5 100644
--- a/paludis/repositories/unpackaged/dep_printer.hh
+++ b/paludis/repositories/unpackaged/dep_printer.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -40,7 +40,7 @@ namespace paludis
void visit(const DependencySpecTree::NodeType<PackageDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<BlockDepSpec>::Type & node);
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node);
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<NamedSetDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<AllDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<ConditionalDepSpec>::Type & node);
diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc
index f08f2f4..1d43650 100644
--- a/paludis/repositories/unpackaged/installed_id.cc
+++ b/paludis/repositories/unpackaged/installed_id.cc
@@ -307,7 +307,7 @@ namespace
mutable std::tr1::shared_ptr<const DependencySpecTree> _v;
mutable Mutex _mutex;
const FSEntry _f;
- const std::tr1::shared_ptr<const DependencyLabelSequence> _labels;
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> _labels;
const std::string _raw_name;
const std::string _human_name;
@@ -316,7 +316,7 @@ namespace
public:
InstalledUnpackagedDependencyKey(const Environment * const e,
const std::string & r, const std::string & h, const FSEntry & f,
- const std::tr1::shared_ptr<const DependencyLabelSequence> & l, const MetadataKeyType t) :
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> & l, const MetadataKeyType t) :
_env(e),
_f(f),
_labels(l),
@@ -356,7 +356,7 @@ namespace
return p.result();
}
- const std::tr1::shared_ptr<const DependencyLabelSequence> initial_labels() const
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> initial_labels() const
{
return _labels;
}
@@ -390,8 +390,8 @@ namespace paludis
const FSEntry root;
const NDBAM * const ndbam;
- std::tr1::shared_ptr<DependencyLabelSequence> build_dependencies_labels;
- std::tr1::shared_ptr<DependencyLabelSequence> run_dependencies_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> build_dependencies_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> run_dependencies_labels;
std::tr1::shared_ptr<LiteralMetadataValueKey<SlotName> > slot_key;
std::tr1::shared_ptr<InstalledUnpackagedFSEntryKey> fs_location_key;
@@ -418,13 +418,13 @@ namespace paludis
repository_name(r),
root(ro),
ndbam(d),
- build_dependencies_labels(new DependencyLabelSequence),
- run_dependencies_labels(new DependencyLabelSequence),
+ build_dependencies_labels(new DependenciesLabelSequence),
+ run_dependencies_labels(new DependenciesLabelSequence),
slot_key(new LiteralMetadataValueKey<SlotName> ("slot", "Slot", mkt_internal, s)),
fs_location_key(new InstalledUnpackagedFSEntryKey(l))
{
- build_dependencies_labels->push_back(make_shared_ptr(new DependencyBuildLabel("build_dependencies")));
- run_dependencies_labels->push_back(make_shared_ptr(new DependencyRunLabel("run_dependencies")));
+ build_dependencies_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("build_dependencies")));
+ run_dependencies_labels->push_back(make_shared_ptr(new DependenciesRunLabel("run_dependencies")));
if ((l / "contents").exists())
{
diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc
index 6be8da0..3fb970d 100644
--- a/paludis/repositories/unpackaged/unpackaged_id.cc
+++ b/paludis/repositories/unpackaged/unpackaged_id.cc
@@ -55,8 +55,8 @@ namespace paludis
const VersionSpec version;
const RepositoryName repository_name;
- std::tr1::shared_ptr<DependencyLabelSequence> build_dependencies_labels;
- std::tr1::shared_ptr<DependencyLabelSequence> run_dependencies_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> build_dependencies_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> run_dependencies_labels;
const std::tr1::shared_ptr<LiteralMetadataValueKey<SlotName> > slot_key;
const std::tr1::shared_ptr<LiteralMetadataValueKey<FSEntry> > fs_location_key;
@@ -79,8 +79,8 @@ namespace paludis
name(q),
version(v),
repository_name(n),
- build_dependencies_labels(new DependencyLabelSequence),
- run_dependencies_labels(new DependencyLabelSequence),
+ build_dependencies_labels(new DependenciesLabelSequence),
+ run_dependencies_labels(new DependenciesLabelSequence),
slot_key(new LiteralMetadataValueKey<SlotName> ("slot", "Slot", mkt_internal, s)),
fs_location_key(new LiteralMetadataValueKey<FSEntry> ("location", "Location", mkt_normal, l)),
build_dependencies_key(new UnpackagedDependencyKey(env, "build_dependencies", "Build dependencies", mkt_dependencies,
@@ -90,8 +90,8 @@ namespace paludis
description_key(new LiteralMetadataValueKey<std::string> ("description", "Description", mkt_significant, d)),
choices_key(new UnpackagedChoicesKey(env, "choices", "Choices", mkt_normal, id))
{
- build_dependencies_labels->push_back(make_shared_ptr(new DependencyBuildLabel("build_dependencies")));
- run_dependencies_labels->push_back(make_shared_ptr(new DependencyRunLabel("run_dependencies")));
+ build_dependencies_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("build_dependencies")));
+ run_dependencies_labels->push_back(make_shared_ptr(new DependenciesRunLabel("run_dependencies")));
}
};
}
diff --git a/paludis/repositories/unpackaged/unpackaged_key.cc b/paludis/repositories/unpackaged/unpackaged_key.cc
index 7d37d44..9fbb1a1 100644
--- a/paludis/repositories/unpackaged/unpackaged_key.cc
+++ b/paludis/repositories/unpackaged/unpackaged_key.cc
@@ -42,14 +42,14 @@ namespace paludis
{
const Environment * const env;
const std::tr1::shared_ptr<const DependencySpecTree> value;
- const std::tr1::shared_ptr<const DependencyLabelSequence> labels;
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> labels;
const std::string raw_name;
const std::string human_name;
const MetadataKeyType type;
Implementation(const Environment * const e, const std::string & v,
- const std::tr1::shared_ptr<const DependencyLabelSequence> & l,
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> & l,
const std::string & r, const std::string & h, const MetadataKeyType t) :
env(e),
value(DepParser::parse(env, v)),
@@ -64,7 +64,7 @@ namespace paludis
UnpackagedDependencyKey::UnpackagedDependencyKey(const Environment * const env,
const std::string & r, const std::string & h, const MetadataKeyType t,
- const std::tr1::shared_ptr<const DependencyLabelSequence> & l,
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> & l,
const std::string & v) :
PrivateImplementationPattern<UnpackagedDependencyKey>(new Implementation<UnpackagedDependencyKey>(env, v, l, r, h, t))
{
@@ -114,7 +114,7 @@ UnpackagedDependencyKey::pretty_print_flat(const DependencySpecTree::ItemFormatt
return p.result();
}
-const std::tr1::shared_ptr<const DependencyLabelSequence>
+const std::tr1::shared_ptr<const DependenciesLabelSequence>
UnpackagedDependencyKey::initial_labels() const
{
return _imp->labels;
diff --git a/paludis/repositories/unpackaged/unpackaged_key.hh b/paludis/repositories/unpackaged/unpackaged_key.hh
index 16ea2fc..61ae6d9 100644
--- a/paludis/repositories/unpackaged/unpackaged_key.hh
+++ b/paludis/repositories/unpackaged/unpackaged_key.hh
@@ -36,7 +36,7 @@ namespace paludis
public:
UnpackagedDependencyKey(const Environment * const env,
const std::string & r, const std::string & h, const MetadataKeyType t,
- const std::tr1::shared_ptr<const DependencyLabelSequence> &,
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> &,
const std::string & v);
~UnpackagedDependencyKey();
@@ -46,7 +46,7 @@ namespace paludis
std::string pretty_print_flat(const DependencySpecTree::ItemFormatter & f) const;
- virtual const std::tr1::shared_ptr<const DependencyLabelSequence> initial_labels() const
+ virtual const std::tr1::shared_ptr<const DependenciesLabelSequence> initial_labels() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::string raw_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index 722bf7c..cd66923 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -53,14 +53,14 @@ namespace paludis
{
const Environment * const env;
const std::tr1::shared_ptr<DependencySpecTree> value;
- const std::tr1::shared_ptr<const DependencyLabelSequence> labels;
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> labels;
const std::tr1::shared_ptr<const PackageDepSpec> spec;
const std::string raw_name;
const std::string human_name;
Implementation(const Environment * const e, const std::tr1::shared_ptr<const PackageID> & v,
- const std::tr1::shared_ptr<const DependencyLabelSequence> & l,
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> & l,
bool exact, const std::string & h, const std::string & r) :
env(e),
value(new DependencySpecTree(make_shared_ptr(new AllDepSpec))),
@@ -91,7 +91,7 @@ namespace paludis
VirtualsDepKey::VirtualsDepKey(const Environment * const e, const std::string & r, const std::string & h,
const std::tr1::shared_ptr<const PackageID> & v,
- const std::tr1::shared_ptr<const DependencyLabelSequence> & l,
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> & l,
const bool exact) :
PrivateImplementationPattern<VirtualsDepKey>(new Implementation<VirtualsDepKey>(e, v, l, exact, r, h)),
_imp(PrivateImplementationPattern<VirtualsDepKey>::_imp)
@@ -150,7 +150,7 @@ VirtualsDepKey::pretty_print_flat(const DependencySpecTree::ItemFormatter & f) c
return pretty_print(f);
}
-const std::tr1::shared_ptr<const DependencyLabelSequence>
+const std::tr1::shared_ptr<const DependenciesLabelSequence>
VirtualsDepKey::initial_labels() const
{
return _imp->labels;
@@ -165,8 +165,8 @@ namespace paludis
const std::tr1::shared_ptr<const Repository> repository;
const QualifiedPackageName name;
const VersionSpec version;
- std::tr1::shared_ptr<DependencyLabelSequence> bdep_labels;
- std::tr1::shared_ptr<DependencyLabelSequence> rdep_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> bdep_labels;
+ std::tr1::shared_ptr<DependenciesLabelSequence> rdep_labels;
const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const PackageID> > > virtual_for;
const std::tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > bdep;
const std::tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > rdep;
@@ -183,15 +183,15 @@ namespace paludis
repository(o),
name(n),
version(p->version()),
- bdep_labels(new DependencyLabelSequence),
- rdep_labels(new DependencyLabelSequence),
+ bdep_labels(new DependenciesLabelSequence),
+ rdep_labels(new DependenciesLabelSequence),
virtual_for(new LiteralMetadataValueKey<std::tr1::shared_ptr<const PackageID> > ("VIRTUAL_FOR", "Virtual for", mkt_normal, p)),
bdep(new virtuals::VirtualsDepKey(e, "DEPEND", "Build dependencies", p, bdep_labels, b)),
rdep(new virtuals::VirtualsDepKey(e, "RDEPEND", "Run dependencies", p, rdep_labels, b)),
has_masks(false)
{
- bdep_labels->push_back(make_shared_ptr(new DependencyBuildLabel("DEPEND")));
- rdep_labels->push_back(make_shared_ptr(new DependencyRunLabel("RDEPEND")));
+ bdep_labels->push_back(make_shared_ptr(new DependenciesBuildLabel("DEPEND")));
+ rdep_labels->push_back(make_shared_ptr(new DependenciesRunLabel("RDEPEND")));
}
};
}
diff --git a/paludis/repositories/virtuals/package_id.hh b/paludis/repositories/virtuals/package_id.hh
index 9a0cf24..51592f3 100644
--- a/paludis/repositories/virtuals/package_id.hh
+++ b/paludis/repositories/virtuals/package_id.hh
@@ -38,7 +38,7 @@ namespace paludis
public:
VirtualsDepKey(const Environment * const, const std::string &, const std::string &,
const std::tr1::shared_ptr<const PackageID> &,
- const std::tr1::shared_ptr<const DependencyLabelSequence> &,
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> &,
const bool);
~VirtualsDepKey();
@@ -51,7 +51,7 @@ namespace paludis
virtual std::string pretty_print_flat(const DependencySpecTree::ItemFormatter &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const std::tr1::shared_ptr<const DependencyLabelSequence> initial_labels() const
+ virtual const std::tr1::shared_ptr<const DependenciesLabelSequence> initial_labels() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::string raw_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/resolver/resolver.cc b/paludis/resolver/resolver.cc
index b474876..667cdca 100644
--- a/paludis/resolver/resolver.cc
+++ b/paludis/resolver/resolver.cc
@@ -841,42 +841,50 @@ namespace
causes_pre_arrow(false),
ignorable(true)
{
- const std::tr1::shared_ptr<const ActiveDependencyLabels> labels(
- reason.sanitised_dependency().active_dependency_labels());
-
- if (labels->type_labels()->empty())
- throw InternalError(PALUDIS_HERE, "resolver bug: why did that happen?");
-
- std::for_each(indirect_iterator(labels->type_labels()->begin()),
- indirect_iterator(labels->type_labels()->end()), accept_visitor(*this));
+ std::for_each(indirect_iterator(reason.sanitised_dependency().active_dependency_labels()->begin()),
+ indirect_iterator(reason.sanitised_dependency().active_dependency_labels()->end()), accept_visitor(*this));
}
- void visit(const DependencyBuildLabel &)
+ void visit(const DependenciesBuildLabel &)
{
causes_pre_arrow = true;
ignorable = false;
}
- void visit(const DependencyRunLabel &)
+ void visit(const DependenciesRunLabel &)
{
causes_pre_arrow = true;
}
- void visit(const DependencyPostLabel &)
+ void visit(const DependenciesPostLabel &)
{
}
- void visit(const DependencyInstallLabel &)
+ void visit(const DependenciesInstallLabel &)
+ {
+ causes_pre_arrow = true;
+ ignorable = false;
+ }
+
+ void visit(const DependenciesCompileAgainstLabel &)
{
causes_pre_arrow = true;
ignorable = false;
}
- void visit(const DependencyCompileLabel &)
+ void visit(const DependenciesFetchLabel &)
{
causes_pre_arrow = true;
ignorable = false;
}
+
+ void visit(const DependenciesRecommendationLabel &)
+ {
+ }
+
+ void visit(const DependenciesSuggestionLabel &)
+ {
+ }
};
}
diff --git a/paludis/resolver/resolver_TEST_serialisation_setup.sh b/paludis/resolver/resolver_TEST_serialisation_setup.sh
index 73ba965..7f564b6 100755
--- a/paludis/resolver/resolver_TEST_serialisation_setup.sh
+++ b/paludis/resolver/resolver_TEST_serialisation_setup.sh
@@ -24,7 +24,7 @@ PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
( build: serialisation/dep serialisation/error )
- ( post,suggested: serialisation/suggestion )
+ ( suggestion: serialisation/suggestion )
"
END
diff --git a/paludis/resolver/resolver_TEST_suggestions_setup.sh b/paludis/resolver/resolver_TEST_suggestions_setup.sh
index f1dde03..d24c796 100755
--- a/paludis/resolver/resolver_TEST_suggestions_setup.sh
+++ b/paludis/resolver/resolver_TEST_suggestions_setup.sh
@@ -23,7 +23,7 @@ SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
- ( post,suggested: suggestion/dep )
+ ( suggestion: suggestion/dep )
"
END
@@ -43,7 +43,7 @@ SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
- ( post,suggested: unmeetable-suggestion/unmeetable-dep )
+ ( suggestion: unmeetable-suggestion/unmeetable-dep )
"
END
@@ -63,8 +63,8 @@ SUMMARY="target"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
- ( build,required: suggestion-then-dependency/hard-dep )
- ( post,suggested: suggestion-then-dependency/a-suggested-dep )
+ ( build: suggestion-then-dependency/hard-dep )
+ ( suggestion: suggestion-then-dependency/a-suggested-dep )
"
END
@@ -74,7 +74,7 @@ SUMMARY="hard dep"
PLATFORMS="test"
SLOT="0"
DEPENDENCIES="
- build,required: suggestion-then-dependency/a-suggested-dep
+ build: suggestion-then-dependency/a-suggested-dep
"
END
diff --git a/paludis/resolver/resolver_test.cc b/paludis/resolver/resolver_test.cc
index e0f24a3..5de0dbd 100644
--- a/paludis/resolver/resolver_test.cc
+++ b/paludis/resolver/resolver_test.cc
@@ -118,25 +118,53 @@ namespace
{
struct IsSuggestionVisitor
{
- bool is_suggestion;
+ bool seen_not_suggestion;
+ bool seen_suggestion;
IsSuggestionVisitor() :
- is_suggestion(true)
+ seen_not_suggestion(false),
+ seen_suggestion(false)
{
}
- void visit(const DependencyRequiredLabel &)
+ void visit(const DependenciesBuildLabel &)
{
- is_suggestion = false;
+ seen_not_suggestion = true;
}
- void visit(const DependencyRecommendedLabel &)
+ void visit(const DependenciesRunLabel &)
{
- is_suggestion = false;
+ seen_not_suggestion = true;
}
- void visit(const DependencySuggestedLabel &)
+ void visit(const DependenciesPostLabel &)
{
+ seen_not_suggestion = true;
+ }
+
+ void visit(const DependenciesSuggestionLabel &)
+ {
+ seen_suggestion = true;
+ }
+
+ void visit(const DependenciesRecommendationLabel &)
+ {
+ seen_not_suggestion = true;
+ }
+
+ void visit(const DependenciesCompileAgainstLabel &)
+ {
+ seen_not_suggestion = true;
+ }
+
+ void visit(const DependenciesInstallLabel &)
+ {
+ seen_not_suggestion = true;
+ }
+
+ void visit(const DependenciesFetchLabel &)
+ {
+ seen_not_suggestion = true;
}
};
@@ -164,16 +192,13 @@ namespace
}
bool
-paludis::resolver::resolver_test::is_suggestion(const SanitisedDependency & dep)
+paludis::resolver::resolver_test::is_just_suggestion(const SanitisedDependency & dep)
{
- if (dep.active_dependency_labels()->suggest_labels()->empty())
- return false;
-
IsSuggestionVisitor v;
- std::for_each(indirect_iterator(dep.active_dependency_labels()->suggest_labels()->begin()),
- indirect_iterator(dep.active_dependency_labels()->suggest_labels()->end()),
+ std::for_each(indirect_iterator(dep.active_dependency_labels()->begin()),
+ indirect_iterator(dep.active_dependency_labels()->end()),
accept_visitor(v));
- return v.is_suggestion;
+ return v.seen_suggestion && ! v.seen_not_suggestion;
}
bool
@@ -182,7 +207,7 @@ paludis::resolver::resolver_test::take_dependency_fn(
const SanitisedDependency & dep,
const std::tr1::shared_ptr<const Reason> &)
{
- return ! is_suggestion(dep);
+ return ! is_just_suggestion(dep);
}
UseExisting
diff --git a/paludis/resolver/resolver_test.hh b/paludis/resolver/resolver_test.hh
index 48c24b8..81256ce 100644
--- a/paludis/resolver/resolver_test.hh
+++ b/paludis/resolver/resolver_test.hh
@@ -62,7 +62,7 @@ namespace paludis
const std::tr1::shared_ptr<const SlotName> &,
const std::tr1::shared_ptr<const Reason> &);
- bool is_suggestion(const SanitisedDependency & dep);
+ bool is_just_suggestion(const SanitisedDependency & dep);
bool take_dependency_fn(
const Resolvent &,
diff --git a/paludis/resolver/sanitised_dependencies.cc b/paludis/resolver/sanitised_dependencies.cc
index e889e5f..ef6d0c5 100644
--- a/paludis/resolver/sanitised_dependencies.cc
+++ b/paludis/resolver/sanitised_dependencies.cc
@@ -55,7 +55,7 @@ namespace
result.append(" " + stringify(*s.spec()));
}
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & s)
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & s)
{
result.append(" " + stringify(*s.spec()));
}
@@ -228,7 +228,7 @@ namespace
super_complicated = true;
}
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
super_complicated = true;
}
@@ -290,13 +290,13 @@ namespace
const std::string raw_name;
const std::string human_name;
std::string original_specs_as_string;
- std::list<std::tr1::shared_ptr<ActiveDependencyLabels> > labels_stack;
+ std::list<std::tr1::shared_ptr<const DependenciesLabelSequence> > labels_stack;
Finder(
const Resolver & r,
const Resolvent & q,
SanitisedDependencies & s,
- const std::tr1::shared_ptr<const DependencyLabelSequence> & l,
+ const std::tr1::shared_ptr<const DependenciesLabelSequence> & l,
const std::string & rn,
const std::string & hn,
const std::string & a) :
@@ -307,7 +307,7 @@ namespace
human_name(hn),
original_specs_as_string(a)
{
- labels_stack.push_front(make_shared_ptr(new ActiveDependencyLabels(*l)));
+ labels_stack.push_front(l);
}
@@ -323,23 +323,8 @@ namespace
SanitisedDependency make_sanitised(const PackageOrBlockDepSpec & spec)
{
std::stringstream adl;
- for (DependencySystemLabelSequence::ConstIterator i((*labels_stack.begin())->system_labels()->begin()),
- i_end((*labels_stack.begin())->system_labels()->end()) ;
- i != i_end ; ++i)
- adl << (adl.str().empty() ? "" : ", ") << stringify(**i);
-
- for (DependencyTypeLabelSequence::ConstIterator i((*labels_stack.begin())->type_labels()->begin()),
- i_end((*labels_stack.begin())->type_labels()->end()) ;
- i != i_end ; ++i)
- adl << (adl.str().empty() ? "" : ", ") << stringify(**i);
-
- for (DependencyABIsLabelSequence::ConstIterator i((*labels_stack.begin())->abi_labels()->begin()),
- i_end((*labels_stack.begin())->abi_labels()->end()) ;
- i != i_end ; ++i)
- adl << (adl.str().empty() ? "" : ", ") << stringify(**i);
-
- for (DependencySuggestLabelSequence::ConstIterator i((*labels_stack.begin())->suggest_labels()->begin()),
- i_end((*labels_stack.begin())->suggest_labels()->end()) ;
+ for (DependenciesLabelSequence::ConstIterator i((*labels_stack.begin())->begin()),
+ i_end((*labels_stack.begin())->end()) ;
i != i_end ; ++i)
adl << (adl.str().empty() ? "" : ", ") << stringify(**i);
@@ -367,7 +352,7 @@ namespace
{
if (node.spec()->condition_met())
{
- labels_stack.push_front(make_shared_ptr(new ActiveDependencyLabels(**labels_stack.begin())));
+ labels_stack.push_front(*labels_stack.begin());
std::for_each(indirect_iterator(node.begin()), indirect_iterator(node.end()), accept_visitor(*this));
labels_stack.pop_front();
}
@@ -375,7 +360,7 @@ namespace
void visit(const DependencySpecTree::NodeType<AllDepSpec>::Type & node)
{
- labels_stack.push_front(make_shared_ptr(new ActiveDependencyLabels(**labels_stack.begin())));
+ labels_stack.push_front(*labels_stack.begin());
std::for_each(indirect_iterator(node.begin()), indirect_iterator(node.end()), accept_visitor(*this));
labels_stack.pop_front();
}
@@ -403,9 +388,11 @@ namespace
throw InternalError(PALUDIS_HERE, "not implemented");
}
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node)
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node)
{
- labels_stack.begin()->reset(new ActiveDependencyLabels(**labels_stack.begin(), *node.spec()));
+ std::tr1::shared_ptr<DependenciesLabelSequence> labels(new DependenciesLabelSequence);
+ std::copy(node.spec()->begin(), node.spec()->end(), labels->back_inserter());
+ *labels_stack.begin() = labels;
}
};
}
diff --git a/paludis/resolver/sanitised_dependencies.hh b/paludis/resolver/sanitised_dependencies.hh
index 2d69e4b..d778766 100644
--- a/paludis/resolver/sanitised_dependencies.hh
+++ b/paludis/resolver/sanitised_dependencies.hh
@@ -63,7 +63,7 @@ namespace paludis
struct SanitisedDependency
{
- NamedValue<n::active_dependency_labels, std::tr1::shared_ptr<const ActiveDependencyLabels> > active_dependency_labels;
+ NamedValue<n::active_dependency_labels, std::tr1::shared_ptr<const DependenciesLabelSequence> > active_dependency_labels;
NamedValue<n::active_dependency_labels_as_string, std::string> active_dependency_labels_as_string;
NamedValue<n::metadata_key_human_name, std::string> metadata_key_human_name;
NamedValue<n::metadata_key_raw_name, std::string> metadata_key_raw_name;
diff --git a/paludis/show_suggest_visitor.cc b/paludis/show_suggest_visitor.cc
index b9a94af..f60075c 100644
--- a/paludis/show_suggest_visitor.cc
+++ b/paludis/show_suggest_visitor.cc
@@ -39,7 +39,7 @@
using namespace paludis;
-typedef std::list<std::tr1::shared_ptr<ActiveDependencyLabels> > LabelsStack;
+typedef std::list<std::tr1::shared_ptr<DependenciesLabelSequence> > LabelsStack;
namespace paludis
{
@@ -64,7 +64,7 @@ namespace paludis
dependency_tags(t),
only_if_suggested_label(l)
{
- labels.push_front(make_shared_ptr(new ActiveDependencyLabels(*make_shared_ptr(new DependencyLabelSequence))));
+ labels.push_front(make_shared_ptr(new DependenciesLabelSequence));
}
};
}
@@ -84,7 +84,7 @@ ShowSuggestVisitor::visit(const DependencySpecTree::NodeType<ConditionalDepSpec>
{
if (node.spec()->condition_met())
{
- _imp->labels.push_front(make_shared_ptr(new ActiveDependencyLabels(**_imp->labels.begin())));
+ _imp->labels.push_front(*_imp->labels.begin());
RunOnDestruction restore_labels(std::tr1::bind(std::tr1::mem_fn(&LabelsStack::pop_front), &_imp->labels));
std::for_each(indirect_iterator(node.begin()), indirect_iterator(node.end()), accept_visitor(*this));
@@ -94,7 +94,7 @@ ShowSuggestVisitor::visit(const DependencySpecTree::NodeType<ConditionalDepSpec>
void
ShowSuggestVisitor::visit(const DependencySpecTree::NodeType<AnyDepSpec>::Type & node)
{
- _imp->labels.push_front(make_shared_ptr(new ActiveDependencyLabels(**_imp->labels.begin())));
+ _imp->labels.push_front(*_imp->labels.begin());
RunOnDestruction restore_labels(std::tr1::bind(std::tr1::mem_fn(&LabelsStack::pop_front), &_imp->labels));
std::for_each(indirect_iterator(node.begin()), indirect_iterator(node.end()), accept_visitor(*this));
@@ -103,7 +103,7 @@ ShowSuggestVisitor::visit(const DependencySpecTree::NodeType<AnyDepSpec>::Type &
void
ShowSuggestVisitor::visit(const DependencySpecTree::NodeType<AllDepSpec>::Type & node)
{
- _imp->labels.push_front(make_shared_ptr(new ActiveDependencyLabels(**_imp->labels.begin())));
+ _imp->labels.push_front(*_imp->labels.begin());
RunOnDestruction restore_labels(std::tr1::bind(std::tr1::mem_fn(&LabelsStack::pop_front), &_imp->labels));
std::for_each(indirect_iterator(node.begin()), indirect_iterator(node.end()), accept_visitor(*this));
@@ -118,26 +118,51 @@ namespace
{
struct SuggestActiveVisitor
{
- bool result;
+ bool visit(const DependenciesBuildLabel &) const
+ {
+ return false;
+ }
+
+ bool visit(const DependenciesRunLabel &) const
+ {
+ return false;
+ }
+
+ bool visit(const DependenciesPostLabel &) const
+ {
+ return false;
+ }
+
+ bool visit(const DependenciesCompileAgainstLabel &) const
+ {
+ return false;
+ }
- SuggestActiveVisitor() :
- result(false)
+ bool visit(const DependenciesFetchLabel &) const
{
+ return false;
}
- void visit(const DependencyRecommendedLabel &)
+ bool visit(const DependenciesInstallLabel &) const
{
+ return false;
}
- void visit(const DependencySuggestedLabel &)
+ bool visit(const DependenciesRecommendationLabel &) const
{
- result = true;
+ return false;
}
- void visit(const DependencyRequiredLabel &)
+ bool visit(const DependenciesSuggestionLabel &) const
{
+ return true;
}
};
+
+ bool is_suggest_label(const std::tr1::shared_ptr<const DependenciesLabel> & l)
+ {
+ return l->accept_returning<bool>(SuggestActiveVisitor());
+ }
}
void
@@ -147,14 +172,9 @@ ShowSuggestVisitor::visit(const DependencySpecTree::NodeType<PackageDepSpec>::Ty
if (_imp->only_if_suggested_label)
{
- SuggestActiveVisitor v;
- for (DependencySuggestLabelSequence::ConstIterator
- i((*_imp->labels.begin())->suggest_labels()->begin()),
- i_end((*_imp->labels.begin())->suggest_labels()->end()) ;
- i != i_end ; ++i)
- (*i)->accept(v);
-
- if (! v.result)
+ if ((*_imp->labels.begin())->end() == std::find_if(((*_imp->labels.begin())->begin()),
+ ((*_imp->labels.begin())->end()),
+ is_suggest_label))
{
Log::get_instance()->message("dep_list.show_suggest_visitor.skipping_suggested", ll_debug, lc_context)
<< "Skipping dep '" << *node.spec() << "' because no suggested label is active";
@@ -199,9 +219,11 @@ ShowSuggestVisitor::visit(const DependencySpecTree::NodeType<PackageDepSpec>::Ty
}
void
-ShowSuggestVisitor::visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node)
+ShowSuggestVisitor::visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node)
{
- _imp->labels.begin()->reset(new ActiveDependencyLabels(**_imp->labels.begin(), *node.spec()));
+ std::tr1::shared_ptr<DependenciesLabelSequence> labels(new DependenciesLabelSequence);
+ std::copy(node.spec()->begin(), node.spec()->end(), labels->back_inserter());
+ *_imp->labels.begin() = labels;
}
void
diff --git a/paludis/show_suggest_visitor.hh b/paludis/show_suggest_visitor.hh
index f13449d..fd40713 100644
--- a/paludis/show_suggest_visitor.hh
+++ b/paludis/show_suggest_visitor.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -63,7 +63,7 @@ namespace paludis
void visit(const DependencySpecTree::NodeType<ConditionalDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<PackageDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<BlockDepSpec>::Type & node);
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type & node);
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node);
void visit(const DependencySpecTree::NodeType<NamedSetDepSpec>::Type & node);
///\}
diff --git a/paludis/spec_tree-fwd.hh b/paludis/spec_tree-fwd.hh
index 6fcc89f..ca87c21 100644
--- a/paludis/spec_tree-fwd.hh
+++ b/paludis/spec_tree-fwd.hh
@@ -76,7 +76,7 @@ namespace paludis
SpecTreeLeafNodeType<PackageDepSpec>,
SpecTreeLeafNodeType<BlockDepSpec>,
SpecTreeLeafNodeType<URILabelsDepSpec>,
- SpecTreeLeafNodeType<DependencyLabelsDepSpec>,
+ SpecTreeLeafNodeType<DependenciesLabelsDepSpec>,
SpecTreeLeafNodeType<NamedSetDepSpec>,
SpecTreeInnerNodeType<AllDepSpec>,
SpecTreeInnerNodeType<AnyDepSpec>,
@@ -119,7 +119,7 @@ namespace paludis
typedef SpecTree<MakeTypeList<
SpecTreeLeafNodeType<PackageDepSpec>,
SpecTreeLeafNodeType<BlockDepSpec>,
- SpecTreeLeafNodeType<DependencyLabelsDepSpec>,
+ SpecTreeLeafNodeType<DependenciesLabelsDepSpec>,
SpecTreeLeafNodeType<NamedSetDepSpec>,
SpecTreeInnerNodeType<AllDepSpec>,
SpecTreeInnerNodeType<AnyDepSpec>,
diff --git a/paludis/spec_tree.cc b/paludis/spec_tree.cc
index 5db00aa..c7f06c9 100644
--- a/paludis/spec_tree.cc
+++ b/paludis/spec_tree.cc
@@ -174,7 +174,7 @@ template class SpecTree<MakeTypeList<
SpecTreeLeafNodeType<PackageDepSpec>,
SpecTreeLeafNodeType<BlockDepSpec>,
SpecTreeLeafNodeType<URILabelsDepSpec>,
- SpecTreeLeafNodeType<DependencyLabelsDepSpec>,
+ SpecTreeLeafNodeType<DependenciesLabelsDepSpec>,
SpecTreeLeafNodeType<NamedSetDepSpec>,
SpecTreeInnerNodeType<AllDepSpec>,
SpecTreeInnerNodeType<AnyDepSpec>,
@@ -217,7 +217,7 @@ template class SpecTree<MakeTypeList<
template class SpecTree<MakeTypeList<
SpecTreeLeafNodeType<PackageDepSpec>,
SpecTreeLeafNodeType<BlockDepSpec>,
- SpecTreeLeafNodeType<DependencyLabelsDepSpec>,
+ SpecTreeLeafNodeType<DependenciesLabelsDepSpec>,
SpecTreeLeafNodeType<NamedSetDepSpec>,
SpecTreeInnerNodeType<AllDepSpec>,
SpecTreeInnerNodeType<AnyDepSpec>,
@@ -248,7 +248,7 @@ template class WrappedForwardIterator<BasicInnerNode<GenericSpecTree>::ConstIter
template class LeafNode<GenericSpecTree, PackageDepSpec>;
template class LeafNode<GenericSpecTree, BlockDepSpec>;
-template class LeafNode<GenericSpecTree, DependencyLabelsDepSpec>;
+template class LeafNode<GenericSpecTree, DependenciesLabelsDepSpec>;
template class LeafNode<GenericSpecTree, NamedSetDepSpec>;
template class LeafNode<GenericSpecTree, PlainTextDepSpec>;
template class LeafNode<GenericSpecTree, PlainTextLabelDepSpec>;
@@ -277,10 +277,10 @@ template const std::tr1::shared_ptr<DependencySpecTree::NodeType<BlockDepSpec>::
template const std::tr1::shared_ptr<DependencySpecTree::NodeType<BlockDepSpec>::Type>
BasicInnerNode<DependencySpecTree>::append<BlockDepSpec>(const std::tr1::shared_ptr<BlockDepSpec> &);
-template const std::tr1::shared_ptr<DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type>
- BasicInnerNode<DependencySpecTree>::append<DependencyLabelsDepSpec>(const std::tr1::shared_ptr<const DependencyLabelsDepSpec> &);
-template const std::tr1::shared_ptr<DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type>
- BasicInnerNode<DependencySpecTree>::append<DependencyLabelsDepSpec>(const std::tr1::shared_ptr<DependencyLabelsDepSpec> &);
+template const std::tr1::shared_ptr<DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type>
+ BasicInnerNode<DependencySpecTree>::append<DependenciesLabelsDepSpec>(const std::tr1::shared_ptr<const DependenciesLabelsDepSpec> &);
+template const std::tr1::shared_ptr<DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type>
+ BasicInnerNode<DependencySpecTree>::append<DependenciesLabelsDepSpec>(const std::tr1::shared_ptr<DependenciesLabelsDepSpec> &);
template const std::tr1::shared_ptr<DependencySpecTree::NodeType<AnyDepSpec>::Type>
BasicInnerNode<DependencySpecTree>::append<AnyDepSpec>(const std::tr1::shared_ptr<const AnyDepSpec> &);
@@ -304,7 +304,7 @@ template class WrappedForwardIterator<BasicInnerNode<DependencySpecTree>::ConstI
template class LeafNode<DependencySpecTree, PackageDepSpec>;
template class LeafNode<DependencySpecTree, BlockDepSpec>;
-template class LeafNode<DependencySpecTree, DependencyLabelsDepSpec>;
+template class LeafNode<DependencySpecTree, DependenciesLabelsDepSpec>;
template class LeafNode<DependencySpecTree, NamedSetDepSpec>;
template class InnerNode<DependencySpecTree, AllDepSpec>;
template class InnerNode<DependencySpecTree, AnyDepSpec>;
@@ -493,7 +493,7 @@ template InnerNode<DependencySpecTree, AnyDepSpec>::operator InnerNode<GenericSp
template InnerNode<DependencySpecTree, ConditionalDepSpec>::operator InnerNode<GenericSpecTree, ConditionalDepSpec> () const;
template LeafNode<DependencySpecTree, PackageDepSpec>::operator LeafNode<GenericSpecTree, PackageDepSpec> () const;
template LeafNode<DependencySpecTree, NamedSetDepSpec>::operator LeafNode<GenericSpecTree, NamedSetDepSpec> () const;
-template LeafNode<DependencySpecTree, DependencyLabelsDepSpec>::operator LeafNode<GenericSpecTree, DependencyLabelsDepSpec> () const;
+template LeafNode<DependencySpecTree, DependenciesLabelsDepSpec>::operator LeafNode<GenericSpecTree, DependenciesLabelsDepSpec> () const;
template LeafNode<DependencySpecTree, BlockDepSpec>::operator LeafNode<GenericSpecTree, BlockDepSpec> () const;
/* LicenseSpecTree -> GenericSpecTree */
diff --git a/paludis/spec_tree.hh b/paludis/spec_tree.hh
index 6103ed5..c29921e 100644
--- a/paludis/spec_tree.hh
+++ b/paludis/spec_tree.hh
@@ -188,8 +188,8 @@ namespace paludis
FetchableURIDepSpec, NoType<3u> >::Type,
typename Select<TypeListContains<VisitableTypeList, typename NodeType<SimpleURIDepSpec>::Type>::value,
SimpleURIDepSpec, NoType<4u> >::Type,
- typename Select<TypeListContains<VisitableTypeList, typename NodeType<DependencyLabelsDepSpec>::Type>::value,
- DependencyLabelsDepSpec, NoType<5u> >::Type,
+ typename Select<TypeListContains<VisitableTypeList, typename NodeType<DependenciesLabelsDepSpec>::Type>::value,
+ DependenciesLabelsDepSpec, NoType<5u> >::Type,
typename Select<TypeListContains<VisitableTypeList, typename NodeType<URILabelsDepSpec>::Type>::value,
URILabelsDepSpec, NoType<6u> >::Type,
typename Select<TypeListContains<VisitableTypeList, typename NodeType<PlainTextDepSpec>::Type>::value,
diff --git a/paludis/stringify_formatter-impl.hh b/paludis/stringify_formatter-impl.hh
index 12aa5d3..b1542c6 100644
--- a/paludis/stringify_formatter-impl.hh
+++ b/paludis/stringify_formatter-impl.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -50,7 +50,7 @@ namespace paludis
const CanFormat<FetchableURIDepSpec> * const f_f_uri;
const CanFormat<SimpleURIDepSpec> * const f_s_uri;
const CanFormat<LicenseDepSpec> * const f_license;
- const CanFormat<DependencyLabelsDepSpec> * const f_dep_label;
+ const CanFormat<DependenciesLabelsDepSpec> * const f_dep_label;
const CanFormat<URILabelsDepSpec> * const f_uri_label;
const CanFormat<PlainTextDepSpec> * const f_plain;
const CanFormat<ConditionalDepSpec> * const f_use_dep;
@@ -69,7 +69,7 @@ namespace paludis
const CanFormat<FetchableURIDepSpec> * const f_f_uri_v,
const CanFormat<SimpleURIDepSpec> * const f_s_uri_v,
const CanFormat<LicenseDepSpec> * const f_license_v,
- const CanFormat<DependencyLabelsDepSpec> * const f_dep_label_v,
+ const CanFormat<DependenciesLabelsDepSpec> * const f_dep_label_v,
const CanFormat<URILabelsDepSpec> * const f_uri_label_v,
const CanFormat<PlainTextDepSpec> * const f_plain_v,
const CanFormat<ConditionalDepSpec> * const f_use_dep_v,
@@ -198,8 +198,8 @@ namespace paludis
std::tr1::is_convertible<T_ *, CanFormat<LicenseDepSpec> *>::value,
LicenseDepSpec>::get(&t),
StringifyFormatterGetForwarder<
- std::tr1::is_convertible<T_ *, CanFormat<DependencyLabelsDepSpec> *>::value,
- DependencyLabelsDepSpec>::get(&t),
+ std::tr1::is_convertible<T_ *, CanFormat<DependenciesLabelsDepSpec> *>::value,
+ DependenciesLabelsDepSpec>::get(&t),
StringifyFormatterGetForwarder<
std::tr1::is_convertible<T_ *, CanFormat<URILabelsDepSpec> *>::value,
URILabelsDepSpec>::get(&t),
diff --git a/paludis/stringify_formatter.cc b/paludis/stringify_formatter.cc
index 36e39ab..6ebc79f 100644
--- a/paludis/stringify_formatter.cc
+++ b/paludis/stringify_formatter.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -166,7 +166,7 @@ StringifyFormatter::format(const LicenseDepSpec & s, const format::Unaccepted &
}
std::string
-StringifyFormatter::format(const DependencyLabelsDepSpec & s, const format::Plain & k) const
+StringifyFormatter::format(const DependenciesLabelsDepSpec & s, const format::Plain & k) const
{
if (_imp->f_dep_label)
return _imp->f_dep_label->format(s, k);
diff --git a/paludis/stringify_formatter.hh b/paludis/stringify_formatter.hh
index 63ad5ed..c429881 100644
--- a/paludis/stringify_formatter.hh
+++ b/paludis/stringify_formatter.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -66,7 +66,7 @@ namespace paludis
public CanFormat<BlockDepSpec>,
public CanFormat<FetchableURIDepSpec>,
public CanFormat<SimpleURIDepSpec>,
- public CanFormat<DependencyLabelsDepSpec>,
+ public CanFormat<DependenciesLabelsDepSpec>,
public CanFormat<URILabelsDepSpec>,
public CanFormat<PlainTextDepSpec>,
public CanFormat<LicenseDepSpec>,
@@ -120,7 +120,7 @@ namespace paludis
virtual std::string format(const SimpleURIDepSpec &, const format::Plain &) const;
- virtual std::string format(const DependencyLabelsDepSpec &, const format::Plain &) const;
+ virtual std::string format(const DependenciesLabelsDepSpec &, const format::Plain &) const;
virtual std::string format(const NamedSetDepSpec &, const format::Plain &) const;
diff --git a/paludis/uninstall_list.cc b/paludis/uninstall_list.cc
index de7df46..14c94d0 100644
--- a/paludis/uninstall_list.cc
+++ b/paludis/uninstall_list.cc
@@ -356,7 +356,7 @@ namespace
{
}
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
}
diff --git a/python/dep_label.cc b/python/dep_label.cc
index 2477be1..4f5d4c9 100644
--- a/python/dep_label.cc
+++ b/python/dep_label.cc
@@ -43,19 +43,19 @@ struct class_concrete_uri_label :
}
};
-template <typename L_, typename C_>
-struct class_concrete_dependency_label :
- bp::class_<L_, std::tr1::shared_ptr<L_>, bp::bases<C_>, boost::noncopyable>
+template <typename L_>
+struct class_concrete_dependencies_label :
+ bp::class_<L_, std::tr1::shared_ptr<L_>, bp::bases<DependenciesLabel>, boost::noncopyable>
{
- class_concrete_dependency_label(const std::string & name, const std::string & doc) :
- bp::class_<L_, std::tr1::shared_ptr<L_>, bp::bases<C_>, boost::noncopyable>
+ class_concrete_dependencies_label(const std::string & name) :
+ bp::class_<L_, std::tr1::shared_ptr<L_>, bp::bases<DependenciesLabel>, boost::noncopyable>
(
name.c_str(),
- doc.c_str(),
+ "A concrete dependencies label class.",
bp::init<const std::string &>("__init__(string)")
)
{
- bp::implicitly_convertible<std::tr1::shared_ptr<L_>, std::tr1::shared_ptr<C_> >();
+ bp::implicitly_convertible<std::tr1::shared_ptr<L_>, std::tr1::shared_ptr<DependenciesLabel> >();
}
};
@@ -90,127 +90,32 @@ void expose_dep_label()
class_concrete_uri_label<URIManualOnlyLabel>("URIManualOnlyLabel");
/**
- * DependencyLabel
+ * DependenciesLabel
*/
- register_shared_ptrs_to_python<DependencyLabel>();
- bp::class_<DependencyLabel, boost::noncopyable>
+ register_shared_ptrs_to_python<DependenciesLabel>();
+ bp::class_<DependenciesLabel, boost::noncopyable>
(
- "DependencyLabel",
- "Dependency label base class.",
+ "DependenciesLabel",
+ "Dependencies label base class.",
bp::no_init
)
- .add_property("text", &DependencyLabel::text,
+ .add_property("text", &DependenciesLabel::text,
"[ro] string\n"
"Our text."
)
- .def("__str__", &DependencyLabel::text)
+ .def("__str__", &DependenciesLabel::text)
;
/**
- * DependencySystemLabel
+ * ConcreteDependenciesLabels
*/
- bp::implicitly_convertible<std::tr1::shared_ptr<DependencySystemLabel>, std::tr1::shared_ptr<DependencyLabel> >();
- register_shared_ptrs_to_python<DependencySystemLabel>();
- bp::class_<DependencySystemLabel, bp::bases<DependencyLabel>, boost::noncopyable>
- (
- "DependencySystemLabel",
- "System dependency label base class.",
- bp::no_init
- );
-
- /**
- * DependencyTypeLabel
- */
- bp::implicitly_convertible<std::tr1::shared_ptr<DependencyTypeLabel>, std::tr1::shared_ptr<DependencyLabel> >();
- register_shared_ptrs_to_python<DependencyTypeLabel>();
- bp::class_<DependencyTypeLabel, bp::bases<DependencyLabel>, boost::noncopyable>
- (
- "DependencyTypeLabel",
- "Type dependency label base class.",
- bp::no_init
- );
-
- /**
- * DependencySuggestLabel
- */
- bp::implicitly_convertible<std::tr1::shared_ptr<DependencySuggestLabel>, std::tr1::shared_ptr<DependencyLabel> >();
- register_shared_ptrs_to_python<DependencySuggestLabel>();
- bp::class_<DependencySuggestLabel, bp::bases<DependencyLabel>, boost::noncopyable>
- (
- "DependencySuggestLabel",
- "Suggest dependency label base class.",
- bp::no_init
- );
-
- /**
- * DependencyABIsLabel
- */
- bp::implicitly_convertible<std::tr1::shared_ptr<DependencyABIsLabel>, std::tr1::shared_ptr<DependencyLabel> >();
- register_shared_ptrs_to_python<DependencyABIsLabel>();
- bp::class_<DependencyABIsLabel, bp::bases<DependencyLabel>, boost::noncopyable>
- (
- "DependencyABIsLabel",
- "ABI dependency label base class.",
- bp::no_init
- );
-
- /**
- * ConcreteDependencyLabels
- */
- class_concrete_dependency_label<DependencyHostLabel, DependencySystemLabel>
- ("DependencyHostLabel",
- "A DependencyHostLabel specifies host requirements for building a package.");
-
- class_concrete_dependency_label<DependencyTargetLabel, DependencySystemLabel>
- ("DependencyTargetLabel",
- "A DependencyTargetLabel specifies target requirements for building a package.");
-
- class_concrete_dependency_label<DependencyBuildLabel, DependencyTypeLabel>
- ("DependencyBuildLabel",
- "A DependencyBuildLabel specifies build-time requirements for building a package.");
-
- class_concrete_dependency_label<DependencyRunLabel, DependencyTypeLabel>
- ("DependencyRunLabel",
- "A DependencyRunLabel specifies runtime requirements for building a package.");
-
- class_concrete_dependency_label<DependencyInstallLabel, DependencyTypeLabel>
- ("DependencyInstallLabel",
- "A DependencyInstallLabel specifies install-time requirements for building a package.");
-
- class_concrete_dependency_label<DependencyCompileLabel, DependencyTypeLabel>
- ("DependencyCompileLabel",
- "A DependencyCompileLabel specifies compiled-against requirements for building a package.");
-
- class_concrete_dependency_label<DependencySuggestedLabel, DependencySuggestLabel>
- ("DependencySuggestedLabel",
- "A DependencySuggestLabel specifies that a dependency is suggested.");
-
- class_concrete_dependency_label<DependencyRecommendedLabel, DependencySuggestLabel>
- ("DependencyRecommendedLabel",
- "A DependencyRecommendedLabel specifies that a dependency is recommended.");
-
- class_concrete_dependency_label<DependencyRequiredLabel, DependencySuggestLabel>
- ("DependencyRequiredLabel",
- "* A DependencyRequiredLabel specifies that a dependency is required.");
-
- class_concrete_dependency_label<DependencyAnyLabel, DependencyABIsLabel>
- ("DependencyAnyLabel",
- "A DependencyAnyLabel specifies that a dependency can be satisfied by\n"
- "any ABI.");
-
- class_concrete_dependency_label<DependencyMineLabel, DependencyABIsLabel>
- ("DependencyMineLabel",
- "A DependencyMineLabel specifies that a dependency is satisfied by\n"
- "ABIs equal to those being used to create the depending package.");
-
- class_concrete_dependency_label<DependencyPrimaryLabel, DependencyABIsLabel>
- ("DependencyPrimaryLabel",
- "A DependencyPrimaryLabel specifies that a dependency can be satisfied by\n"
- "the primary ABI.");
-
- class_concrete_dependency_label<DependencyABILabel, DependencyABIsLabel>
- ("DependencyABILabel",
- "A DependencyABILabel specifies that a dependency can be satisfied by\n"
- "a named ABI.");
+ class_concrete_dependencies_label<DependenciesBuildLabel>("DependenciesBuildLabel");
+ class_concrete_dependencies_label<DependenciesRunLabel>("DependenciesRunLabel");
+ class_concrete_dependencies_label<DependenciesPostLabel>("DependenciesPostLabel");
+ class_concrete_dependencies_label<DependenciesCompileAgainstLabel>("DependenciesCompileAgainstLabel");
+ class_concrete_dependencies_label<DependenciesInstallLabel>("DependenciesInstallLabel");
+ class_concrete_dependencies_label<DependenciesFetchLabel>("DependenciesFetchLabel");
+ class_concrete_dependencies_label<DependenciesSuggestionLabel>("DependenciesSuggestionLabel");
+ class_concrete_dependencies_label<DependenciesRecommendationLabel>("DependenciesRecommendationLabel");
}
diff --git a/python/dep_label_TEST.py b/python/dep_label_TEST.py
index 91130e7..eaf1837 100755
--- a/python/dep_label_TEST.py
+++ b/python/dep_label_TEST.py
@@ -46,33 +46,24 @@ class TestCase_01_URILabels(unittest.TestCase):
for l in self.list:
self.assert_(str(l), "foo")
-class TestCase_02_DependencyLabels(unittest.TestCase):
+class TestCase_02_DependenciesLabels(unittest.TestCase):
def setUp(self):
self.list = []
- self.list.append((DependencyHostLabel("foo"), DependencySystemLabel))
- self.list.append((DependencyTargetLabel("foo"), DependencySystemLabel))
- self.list.append((DependencyBuildLabel("foo"), DependencyTypeLabel))
- self.list.append((DependencyRunLabel("foo"), DependencyTypeLabel))
- self.list.append((DependencyInstallLabel("foo"), DependencyTypeLabel))
- self.list.append((DependencyCompileLabel("foo"), DependencyTypeLabel))
- self.list.append((DependencySuggestedLabel("foo"), DependencySuggestLabel))
- self.list.append((DependencyRecommendedLabel("foo"), DependencySuggestLabel))
- self.list.append((DependencyRequiredLabel("foo"), DependencySuggestLabel))
- self.list.append((DependencyAnyLabel("foo"), DependencyABIsLabel))
- self.list.append((DependencyMineLabel("foo"), DependencyABIsLabel))
- self.list.append((DependencyPrimaryLabel("foo"), DependencyABIsLabel))
- self.list.append((DependencyABILabel("foo"), DependencyABIsLabel))
+ self.list.append((DependenciesBuildLabel("foo"), DependenciesLabel))
+ self.list.append((DependenciesRunLabel("foo"), DependenciesLabel))
+ self.list.append((DependenciesPostLabel("foo"), DependenciesLabel))
+ self.list.append((DependenciesCompileAgainstLabel("foo"), DependenciesLabel))
+ self.list.append((DependenciesInstallLabel("foo"), DependenciesLabel))
+ self.list.append((DependenciesFetchLabel("foo"), DependenciesLabel))
+ self.list.append((DependenciesSuggestionLabel("foo"), DependenciesLabel))
+ self.list.append((DependenciesRecommendationLabel("foo"), DependenciesLabel))
def test_01_no_create(self):
- self.assertRaises(Exception, DependencyLabel)
- self.assertRaises(Exception, DependencySystemLabel)
- self.assertRaises(Exception, DependencyTypeLabel)
- self.assertRaises(Exception, DependencySuggestLabel)
- self.assertRaises(Exception, DependencyABIsLabel)
+ self.assertRaises(Exception, DependenciesLabel)
def test_02_inheritance(self):
for t in self.list:
- self.assert_(isinstance(t[0], DependencyLabel))
+ self.assert_(isinstance(t[0], DependenciesLabel))
self.assert_(isinstance(t[0], t[1]))
def test_03_text(self):
diff --git a/python/dep_spec.cc b/python/dep_spec.cc
index 375e3de..e9126db 100644
--- a/python/dep_spec.cc
+++ b/python/dep_spec.cc
@@ -535,11 +535,11 @@ PythonPlainTextLabelDepSpec::PythonPlainTextLabelDepSpec(const PlainTextLabelDep
{
}
-PythonDependencyLabelsDepSpec::PythonDependencyLabelsDepSpec(const std::string &)
+PythonDependenciesLabelsDepSpec::PythonDependenciesLabelsDepSpec(const std::string &)
{
}
-PythonDependencyLabelsDepSpec::PythonDependencyLabelsDepSpec(const DependencyLabelsDepSpec &)
+PythonDependenciesLabelsDepSpec::PythonDependenciesLabelsDepSpec(const DependenciesLabelsDepSpec &)
{
}
@@ -634,9 +634,9 @@ SpecTreeToPython::visit(const GenericSpecTree::NodeType<PlainTextLabelDepSpec>::
}
void
-SpecTreeToPython::visit(const GenericSpecTree::NodeType<DependencyLabelsDepSpec>::Type & node)
+SpecTreeToPython::visit(const GenericSpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node)
{
- _current_parent->add_child(make_shared_ptr(new PythonDependencyLabelsDepSpec(*node.spec())));
+ _current_parent->add_child(make_shared_ptr(new PythonDependenciesLabelsDepSpec(*node.spec())));
}
const std::tr1::shared_ptr<const PythonDepSpec>
@@ -699,7 +699,7 @@ struct AllowedTypes<DependencySpecTree>
AllowedTypes(const ConditionalDepSpec &) {};
AllowedTypes(const PackageDepSpec &) {};
AllowedTypes(const BlockDepSpec &) {};
- AllowedTypes(const DependencyLabelsDepSpec &) {};
+ AllowedTypes(const DependenciesLabelsDepSpec &) {};
AllowedTypes(const NamedSetDepSpec &) {};
};
@@ -844,9 +844,9 @@ SpecTreeFromPython<H_>::visit(const PythonPlainTextLabelDepSpec & d)
template <typename H_>
void
-SpecTreeFromPython<H_>::visit(const PythonDependencyLabelsDepSpec & d)
+SpecTreeFromPython<H_>::visit(const PythonDependenciesLabelsDepSpec & d)
{
- dispatch<H_, DependencyLabelsDepSpec>(this, d);
+ dispatch<H_, DependenciesLabelsDepSpec>(this, d);
}
template <typename H_>
@@ -938,9 +938,9 @@ SpecTreeFromPython<H_>::real_visit(const PythonPlainTextLabelDepSpec & s)
template <typename H_>
void
-SpecTreeFromPython<H_>::real_visit(const PythonDependencyLabelsDepSpec &)
+SpecTreeFromPython<H_>::real_visit(const PythonDependenciesLabelsDepSpec &)
{
- _add_to->append(make_shared_ptr(new DependencyLabelsDepSpec));
+ _add_to->append(make_shared_ptr(new DependenciesLabelsDepSpec));
}
template <typename H_>
@@ -1351,13 +1351,13 @@ void expose_dep_spec()
;
/**
- * DependencyLabelsDepSpec
+ * DependenciesLabelsDepSpec
*/
- RegisterDepSpecToPython<DependencyLabelsDepSpec, PythonDependencyLabelsDepSpec>();
- bp::class_<PythonDependencyLabelsDepSpec, bp::bases<PythonDepSpec>, boost::noncopyable>
+ RegisterDepSpecToPython<DependenciesLabelsDepSpec, PythonDependenciesLabelsDepSpec>();
+ bp::class_<PythonDependenciesLabelsDepSpec, bp::bases<PythonDepSpec>, boost::noncopyable>
(
- "DependencyLabelsDepSpec",
- "A DependencyLabelsDepSpec represents a dependency label.",
+ "DependenciesLabelsDepSpec",
+ "A DependenciesLabelsDepSpec represents a dependency label.",
bp::init<const std::string &>("__init__(str)")
)
;
diff --git a/python/dep_spec.hh b/python/dep_spec.hh
index d6fe170..57cbefc 100644
--- a/python/dep_spec.hh
+++ b/python/dep_spec.hh
@@ -42,7 +42,7 @@ namespace paludis
class PythonBlockDepSpec;
class PythonURILabelsDepSpec;
class PythonPlainTextLabelDepSpec;
- class PythonDependencyLabelsDepSpec;
+ class PythonDependenciesLabelsDepSpec;
class PythonNamedSetDepSpec;
class PALUDIS_VISIBLE PythonDepSpec :
@@ -59,7 +59,7 @@ namespace paludis
PythonSimpleURIDepSpec,
PythonURILabelsDepSpec,
PythonPlainTextLabelDepSpec,
- PythonDependencyLabelsDepSpec,
+ PythonDependenciesLabelsDepSpec,
PythonNamedSetDepSpec
>::Type>
{
@@ -270,13 +270,13 @@ namespace paludis
PythonPlainTextLabelDepSpec(const PlainTextLabelDepSpec &);
};
- class PALUDIS_VISIBLE PythonDependencyLabelsDepSpec :
+ class PALUDIS_VISIBLE PythonDependenciesLabelsDepSpec :
public PythonDepSpec,
- public ImplementAcceptMethods<PythonDepSpec, PythonDependencyLabelsDepSpec>
+ public ImplementAcceptMethods<PythonDepSpec, PythonDependenciesLabelsDepSpec>
{
public:
- PythonDependencyLabelsDepSpec(const std::string &);
- PythonDependencyLabelsDepSpec(const DependencyLabelsDepSpec &);
+ PythonDependenciesLabelsDepSpec(const std::string &);
+ PythonDependenciesLabelsDepSpec(const DependenciesLabelsDepSpec &);
};
/**
@@ -307,7 +307,7 @@ namespace paludis
void visit(const GenericSpecTree::NodeType<LicenseDepSpec>::Type &);
void visit(const GenericSpecTree::NodeType<PlainTextLabelDepSpec>::Type &);
void visit(const GenericSpecTree::NodeType<URILabelsDepSpec>::Type &);
- void visit(const GenericSpecTree::NodeType<DependencyLabelsDepSpec>::Type &);
+ void visit(const GenericSpecTree::NodeType<DependenciesLabelsDepSpec>::Type &);
void visit(const GenericSpecTree::NodeType<NamedSetDepSpec>::Type &);
};
@@ -340,7 +340,7 @@ namespace paludis
void visit(const PythonLicenseDepSpec &);
void visit(const PythonURILabelsDepSpec &);
void visit(const PythonPlainTextLabelDepSpec &);
- void visit(const PythonDependencyLabelsDepSpec &);
+ void visit(const PythonDependenciesLabelsDepSpec &);
void visit(const PythonNamedSetDepSpec &);
void real_visit(const PythonAllDepSpec &);
@@ -353,7 +353,7 @@ namespace paludis
void real_visit(const PythonSimpleURIDepSpec &);
void real_visit(const PythonURILabelsDepSpec &);
void real_visit(const PythonPlainTextLabelDepSpec &);
- void real_visit(const PythonDependencyLabelsDepSpec &);
+ void real_visit(const PythonDependenciesLabelsDepSpec &);
void real_visit(const PythonLicenseDepSpec &);
void real_visit(const PythonNamedSetDepSpec &);
};
diff --git a/python/formatter.cc b/python/formatter.cc
index 4124bf0..044a2dc 100644
--- a/python/formatter.cc
+++ b/python/formatter.cc
@@ -293,7 +293,7 @@ class PythonFormatterWrapper :
public PythonCanFormat<BlockDepSpec>,
public PythonCanFormat<FetchableURIDepSpec>,
public PythonCanFormat<SimpleURIDepSpec>,
- public PythonCanFormat<DependencyLabelsDepSpec>,
+ public PythonCanFormat<DependenciesLabelsDepSpec>,
public PythonCanFormat<URILabelsDepSpec>,
public PythonCanFormat<PlainTextLabelDepSpec>,
public PythonCanFormat<PlainTextDepSpec>,
@@ -389,16 +389,16 @@ void expose_formatter()
;
/**
- * CanFormatDependencyLabelsDepSpec
+ * CanFormatDependenciesLabelsDepSpec
*/
- bp::class_<PythonCanFormatWrapper<DependencyLabelsDepSpec>, boost::noncopyable>
+ bp::class_<PythonCanFormatWrapper<DependenciesLabelsDepSpec>, boost::noncopyable>
(
- "CanFormatDependencyLabelsDepSpec",
- "Descendents of this class implement the necessary methods to format a DependencyLabelsDepSpec.",
+ "CanFormatDependenciesLabelsDepSpec",
+ "Descendents of this class implement the necessary methods to format a DependenciesLabelsDepSpec.",
bp::init<>("__init__()")
)
- .def("format_dependency_labels_dep_spec_plain",
- &PythonCanFormatWrapper<DependencyLabelsDepSpec>::format_plain)
+ .def("format_dependencies_labels_dep_spec_plain",
+ &PythonCanFormatWrapper<DependenciesLabelsDepSpec>::format_plain)
;
/**
@@ -557,7 +557,7 @@ void expose_formatter()
CanFormat<ConditionalDepSpec>,
CanFormat<PackageDepSpec>,
CanFormat<NamedSetDepSpec>,
- CanFormat<DependencyLabelsDepSpec> >,
+ CanFormat<DependenciesLabelsDepSpec> >,
boost::noncopyable>
(
"DependencySpecTreeFormatter",
@@ -632,7 +632,7 @@ void expose_formatter()
CanFormat<BlockDepSpec>,
CanFormat<FetchableURIDepSpec>,
CanFormat<SimpleURIDepSpec>,
- CanFormat<DependencyLabelsDepSpec>,
+ CanFormat<DependenciesLabelsDepSpec>,
CanFormat<URILabelsDepSpec>,
CanFormat<PlainTextLabelDepSpec>,
CanFormat<PlainTextDepSpec>,
@@ -673,7 +673,7 @@ void expose_formatter()
CanFormat<BlockDepSpec>,
CanFormat<FetchableURIDepSpec>,
CanFormat<SimpleURIDepSpec>,
- CanFormat<DependencyLabelsDepSpec>,
+ CanFormat<DependenciesLabelsDepSpec>,
CanFormat<URILabelsDepSpec>,
CanFormat<PlainTextLabelDepSpec>,
CanFormat<PlainTextDepSpec>,
diff --git a/python/metadata_key.cc b/python/metadata_key.cc
index c3c83bd..101a6e0 100644
--- a/python/metadata_key.cc
+++ b/python/metadata_key.cc
@@ -864,7 +864,7 @@ struct MetadataSpecTreeKeyWrapper<DependencySpecTree> :
throw PythonMethodNotImplemented("MetadataSpecTreeKey", "pretty_print_flat");
}
- virtual const std::tr1::shared_ptr<const DependencyLabelSequence> initial_labels() const
+ virtual const std::tr1::shared_ptr<const DependenciesLabelSequence> initial_labels() const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
Lock l(get_mutex());
@@ -1073,8 +1073,8 @@ struct class_spec_tree_key<DependencySpecTree> :
);
def("initial_labels", bp::pure_virtual(&MetadataSpecTreeKey<DependencySpecTree>::initial_labels),
- "initial_label() -> DependencyLabelSequence\n"
- "Return a DependencyLabelSequence that represents the initial labels to use when\n"
+ "initial_label() -> DependenciesLabelSequence\n"
+ "Return a DependenciesLabelSequence that represents the initial labels to use when\n"
"deciding the behaviour of individual items in the heirarchy."
);
}
diff --git a/python/nice_names.nn b/python/nice_names.nn
index 9763d1e..e89b6f5 100644
--- a/python/nice_names.nn
+++ b/python/nice_names.nn
@@ -33,7 +33,7 @@ make_nn_NiceNames() {
name "NamedSetDepSpec"
name "URILabelsDepSpec"
name "PlainTextLabelDepSpec"
- name "DependencyLabelsDepSpec"
+ name "DependenciesLabelsDepSpec"
# paludis/dep_tree-fwd.hh
name "GenericSpecTree"
@@ -72,7 +72,7 @@ make_nn_LowercaseNiceNames() {
name "BlockDepSpec" "block_dep_spec"
name "FetchableURIDepSpec" "fetchable_uri_dep_spec"
name "SimpleURIDepSpec" "simple_uri_dep_spec"
- name "DependencyLabelsDepSpec" "dependency_labels_dep_spec"
+ name "DependenciesLabelsDepSpec" "dependencies_labels_dep_spec"
name "URILabelsDepSpec" "uri_labels_dep_spec"
name "PlainTextLabelDepSpec" "plain_text_label_dep_spec"
name "PlainTextDepSpec" "plain_text_dep_spec"
diff --git a/ruby/Makefile.am b/ruby/Makefile.am
index 48d7872..039a73a 100644
--- a/ruby/Makefile.am
+++ b/ruby/Makefile.am
@@ -21,7 +21,6 @@ IF_RUBY_TESTS = \
action_TEST.rb \
choice_TEST.rb \
contents_TEST.rb \
- dep_label_TEST.rb \
dep_list_TEST.rb \
dep_spec_TEST.rb \
dep_tag_TEST.rb \
diff --git a/ruby/dep_label.cc b/ruby/dep_label.cc
index af25f82..9981bb4 100644
--- a/ruby/dep_label.cc
+++ b/ruby/dep_label.cc
@@ -44,27 +44,15 @@ namespace
static VALUE c_uri_local_mirrors_only_label;
static VALUE c_uri_manual_only_label;
- static VALUE c_dependency_label;
- static VALUE c_dependency_system_label;
- static VALUE c_dependency_type_label;
- static VALUE c_dependency_suggest_label;
- static VALUE c_dependency_abis_label;
- static VALUE c_dependency_host_label;
- static VALUE c_dependency_target_label;
- static VALUE c_dependency_build_label;
- static VALUE c_dependency_run_label;
- static VALUE c_dependency_post_label;
- static VALUE c_dependency_compile_label;
- static VALUE c_dependency_install_label;
- static VALUE c_dependency_suggested_label;
- static VALUE c_dependency_recommended_label;
- static VALUE c_dependency_required_label;
- static VALUE c_dependency_any_label;
- static VALUE c_dependency_mine_label;
- static VALUE c_dependency_primary_label;
- static VALUE c_dependency_abi_label;
-
- static VALUE c_active_dependency_labels;
+ static VALUE c_dependencies_label;
+ static VALUE c_dependencies_build_label;
+ static VALUE c_dependencies_compile_against_label;
+ static VALUE c_dependencies_fetch_label;
+ static VALUE c_dependencies_install_label;
+ static VALUE c_dependencies_post_label;
+ static VALUE c_dependencies_recommendation_label;
+ static VALUE c_dependencies_run_label;
+ static VALUE c_dependencies_suggestion_label;
struct URILabelToValue
{
@@ -113,152 +101,86 @@ namespace
}
};
- struct RealDependencyLabelToValue
+ /*
+ * Document-method: text
+ *
+ * call-seq:
+ * text -> String
+ *
+ * Our text.
+ */
+ /*
+ * Document-method: to_s
+ *
+ * call-seq:
+ * to_s -> String
+ *
+ * Fetch a string representation of ourself.
+ */
+ VALUE
+ uri_label_text(VALUE self)
+ {
+ std::tr1::shared_ptr<const URILabel> * ptr;
+ Data_Get_Struct(self, std::tr1::shared_ptr<const URILabel>, ptr);
+ return rb_str_new2((*ptr)->text().c_str());
+ }
+
+ struct DependenciesLabelToValue
{
VALUE value;
- std::tr1::shared_ptr<const DependencyLabel> mm;
+ std::tr1::shared_ptr<const DependenciesLabel> mm;
- RealDependencyLabelToValue(const std::tr1::shared_ptr<const DependencyLabel> & _m) :
+ DependenciesLabelToValue(const std::tr1::shared_ptr<const DependenciesLabel> & _m) :
mm(_m)
{
- value = Qnil;
- }
-
- void visit(const DependencyHostLabel &)
- {
- value = Data_Wrap_Struct(c_dependency_host_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
- }
-
- void visit(const DependencyTargetLabel &)
- {
- value = Data_Wrap_Struct(c_dependency_target_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
- }
-
- void visit(const DependencyBuildLabel &)
- {
- value = Data_Wrap_Struct(c_dependency_build_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
- }
-
- void visit(const DependencyRunLabel &)
- {
- value = Data_Wrap_Struct(c_dependency_run_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
- }
-
- void visit(const DependencyPostLabel &)
- {
- value = Data_Wrap_Struct(c_dependency_post_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
- }
-
- void visit(const DependencyCompileLabel &)
- {
- value = Data_Wrap_Struct(c_dependency_compile_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
- }
-
- void visit(const DependencyInstallLabel &)
- {
- value = Data_Wrap_Struct(c_dependency_install_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
- }
-
- void visit(const DependencySuggestedLabel &)
- {
- value = Data_Wrap_Struct(c_dependency_suggested_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
- }
-
- void visit(const DependencyRecommendedLabel &)
- {
- value = Data_Wrap_Struct(c_dependency_recommended_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
}
- void visit(const DependencyRequiredLabel &)
+ void visit(const DependenciesBuildLabel &)
{
- value = Data_Wrap_Struct(c_dependency_required_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
+ value = Data_Wrap_Struct(c_dependencies_build_label, 0, &Common<std::tr1::shared_ptr<const DependenciesLabel> >::free,
+ new std::tr1::shared_ptr<const DependenciesLabel>(mm));
}
- void visit(const DependencyAnyLabel &)
+ void visit(const DependenciesRunLabel &)
{
- value = Data_Wrap_Struct(c_dependency_any_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
+ value = Data_Wrap_Struct(c_dependencies_run_label, 0, &Common<std::tr1::shared_ptr<const DependenciesLabel> >::free,
+ new std::tr1::shared_ptr<const DependenciesLabel>(mm));
}
- void visit(const DependencyMineLabel &)
+ void visit(const DependenciesPostLabel &)
{
- value = Data_Wrap_Struct(c_dependency_mine_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
+ value = Data_Wrap_Struct(c_dependencies_post_label, 0, &Common<std::tr1::shared_ptr<const DependenciesLabel> >::free,
+ new std::tr1::shared_ptr<const DependenciesLabel>(mm));
}
- void visit(const DependencyPrimaryLabel &)
+ void visit(const DependenciesInstallLabel &)
{
- value = Data_Wrap_Struct(c_dependency_primary_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
+ value = Data_Wrap_Struct(c_dependencies_install_label, 0, &Common<std::tr1::shared_ptr<const DependenciesLabel> >::free,
+ new std::tr1::shared_ptr<const DependenciesLabel>(mm));
}
- void visit(const DependencyABILabel &)
+ void visit(const DependenciesFetchLabel &)
{
- value = Data_Wrap_Struct(c_dependency_abi_label, 0,
- &Common<std::tr1::shared_ptr<const DependencyLabel> >::free,
- new std::tr1::shared_ptr<const DependencyLabel>(mm));
+ value = Data_Wrap_Struct(c_dependencies_fetch_label, 0, &Common<std::tr1::shared_ptr<const DependenciesLabel> >::free,
+ new std::tr1::shared_ptr<const DependenciesLabel>(mm));
}
- };
- struct DependencyLabelToValue
- {
- VALUE value;
- std::tr1::shared_ptr<const DependencyLabel> mm;
-
- DependencyLabelToValue(const std::tr1::shared_ptr<const DependencyLabel> & _m) :
- mm(_m)
+ void visit(const DependenciesSuggestionLabel &)
{
+ value = Data_Wrap_Struct(c_dependencies_suggestion_label, 0, &Common<std::tr1::shared_ptr<const DependenciesLabel> >::free,
+ new std::tr1::shared_ptr<const DependenciesLabel>(mm));
}
- void visit(const DependencySystemLabel & label)
+ void visit(const DependenciesRecommendationLabel &)
{
- RealDependencyLabelToValue v(mm);
- label.accept(v);
- value = v.value;
+ value = Data_Wrap_Struct(c_dependencies_recommendation_label, 0, &Common<std::tr1::shared_ptr<const DependenciesLabel> >::free,
+ new std::tr1::shared_ptr<const DependenciesLabel>(mm));
}
- void visit(const DependencyTypeLabel & label)
+ void visit(const DependenciesCompileAgainstLabel &)
{
- RealDependencyLabelToValue v(mm);
- label.accept(v);
- value = v.value;
- }
-
- void visit(const DependencySuggestLabel & label)
- {
- RealDependencyLabelToValue v(mm);
- label.accept(v);
- value = v.value;
- }
-
- void visit(const DependencyABIsLabel & label)
- {
- RealDependencyLabelToValue v(mm);
- label.accept(v);
- value = v.value;
+ value = Data_Wrap_Struct(c_dependencies_compile_against_label, 0, &Common<std::tr1::shared_ptr<const DependenciesLabel> >::free,
+ new std::tr1::shared_ptr<const DependenciesLabel>(mm));
}
};
@@ -279,34 +201,10 @@ namespace
* Fetch a string representation of ourself.
*/
VALUE
- uri_label_text(VALUE self)
- {
- std::tr1::shared_ptr<const URILabel> * ptr;
- Data_Get_Struct(self, std::tr1::shared_ptr<const URILabel>, ptr);
- return rb_str_new2((*ptr)->text().c_str());
- }
-
- /*
- * Document-method: text
- *
- * call-seq:
- * text -> String
- *
- * Our text.
- */
- /*
- * Document-method: to_s
- *
- * call-seq:
- * to_s -> String
- *
- * Fetch a string representation of ourself.
- */
- VALUE
- dependency_label_text(VALUE self)
+ dependencies_label_text(VALUE self)
{
- std::tr1::shared_ptr<const DependencyLabel> * ptr;
- Data_Get_Struct(self, std::tr1::shared_ptr<const DependencyLabel>, ptr);
+ std::tr1::shared_ptr<const DependenciesLabel> * ptr;
+ Data_Get_Struct(self, std::tr1::shared_ptr<const DependenciesLabel>, ptr);
return rb_str_new2((*ptr)->text().c_str());
}
@@ -316,82 +214,6 @@ namespace
return self;
}
- VALUE
- active_dependency_labels_new(int argc, VALUE *argv, VALUE self)
- {
- std::tr1::shared_ptr<ActiveDependencyLabels> * ptr(0);
- try
- {
- if (1 == argc && rb_obj_is_kind_of(argv[0], c_active_dependency_labels))
- {
- ptr = new std::tr1::shared_ptr<ActiveDependencyLabels>(
- new ActiveDependencyLabels(*value_to_active_dependency_labels(argv[0])));
- }
- else if (1 == argc && rb_obj_is_kind_of(argv[0], *dependency_labels_dep_spec_value_ptr()))
- {
- ptr = new std::tr1::shared_ptr<ActiveDependencyLabels>(
- new ActiveDependencyLabels(*value_to_dependency_labels_dep_spec(argv[0])));
- }
- else if (1 == argc && rb_obj_is_kind_of(argv[0], rb_cArray))
- {
- std::tr1::shared_ptr<DependencyLabelSequence> seq(new DependencyLabelSequence);
-
- for (int i(0) ; i < RARRAY_LEN(argv[0]) ; ++i)
- {
- VALUE entry(rb_ary_entry(argv[0], i));
- seq->push_back(value_to_dependency_label(entry));
- }
-
- ptr = new std::tr1::shared_ptr<ActiveDependencyLabels>(new ActiveDependencyLabels(*seq));
- }
- else if (2 == argc && rb_obj_is_kind_of(argv[0], c_active_dependency_labels) &&
- rb_obj_is_kind_of(argv[1], *dependency_labels_dep_spec_value_ptr()))
- {
- ptr = new std::tr1::shared_ptr<ActiveDependencyLabels>(
- new ActiveDependencyLabels(*value_to_active_dependency_labels(argv[0]),
- *value_to_dependency_labels_dep_spec(argv[1])));
- }
- else
- {
- rb_raise(rb_eArgError, "ActiveDependencyLabels expects one or two arguments, but got %d",argc);
- }
-
- VALUE tdata(Data_Wrap_Struct(self, 0, &Common<std::tr1::shared_ptr<ActiveDependencyLabels> >::free, ptr));
- rb_obj_call_init(tdata, argc, argv);
- return tdata;
- }
- catch (const std::exception & e)
- {
- delete ptr;
- exception_to_ruby_exception(e);
- }
- }
-
- template <typename T_, const std::tr1::shared_ptr<const T_> (ActiveDependencyLabels::* f_) () const>
- struct ActiveDependencyLabelsLabels
- {
- static VALUE
- get(VALUE self)
- {
- try
- {
- std::tr1::shared_ptr<ActiveDependencyLabels> * ptr;
- Data_Get_Struct(self, std::tr1::shared_ptr<ActiveDependencyLabels>, ptr);
- std::tr1::shared_ptr<const T_> v(((**ptr).*(f_))());
-
- VALUE result(rb_ary_new());
- for (typename T_::ConstIterator i(v->begin()), i_end(v->end()) ;
- i != i_end ; ++i)
- rb_ary_push(result, dependency_label_to_value(*i));
- return result;
- }
- catch (const std::exception & e)
- {
- exception_to_ruby_exception(e);
- }
- }
- };
-
void do_register_dep_label()
{
/*
@@ -411,80 +233,25 @@ namespace
c_uri_local_mirrors_only_label = rb_define_class_under(paludis_module(), "URILocalMirrorsOnlyLabel", c_uri_label);
c_uri_manual_only_label = rb_define_class_under(paludis_module(), "URIManualOnlyLabel", c_uri_label);
- c_dependency_label = rb_define_class_under(paludis_module(), "DependencyLabel", rb_cObject);
- rb_funcall(c_dependency_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
- rb_define_method(c_dependency_label, "text", RUBY_FUNC_CAST(&dependency_label_text), 0);
- rb_define_method(c_dependency_label, "to_s", RUBY_FUNC_CAST(&dependency_label_text), 0);
-
- c_dependency_system_label = rb_define_class_under(paludis_module(), "DependencySystemLabel", c_dependency_label);
- rb_funcall(c_dependency_system_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_type_label = rb_define_class_under(paludis_module(), "DependencyTypeLabel", c_dependency_label);
- rb_funcall(c_dependency_type_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_suggest_label = rb_define_class_under(paludis_module(), "DependencySuggestLabel", c_dependency_label);
- rb_funcall(c_dependency_suggest_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_abis_label = rb_define_class_under(paludis_module(), "DependencyABIsLabel", c_dependency_label);
- rb_funcall(c_dependency_abis_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_host_label = rb_define_class_under(paludis_module(), "DependencyHostLabel", c_dependency_system_label);
- rb_funcall(c_dependency_host_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_target_label = rb_define_class_under(paludis_module(), "DependencyTargetLabel", c_dependency_system_label);
- rb_funcall(c_dependency_target_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_build_label = rb_define_class_under(paludis_module(), "DependencyBuildLabel", c_dependency_type_label);
- rb_funcall(c_dependency_build_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_run_label = rb_define_class_under(paludis_module(), "DependencyRunLabel", c_dependency_type_label);
- rb_funcall(c_dependency_run_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_post_label = rb_define_class_under(paludis_module(), "DependencyPostLabel", c_dependency_type_label);
- rb_funcall(c_dependency_post_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_compile_label = rb_define_class_under(paludis_module(), "DependencyCompileLabel", c_dependency_type_label);
- rb_funcall(c_dependency_compile_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_install_label = rb_define_class_under(paludis_module(), "DependencyInstallLabel", c_dependency_type_label);
- rb_funcall(c_dependency_install_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_suggested_label = rb_define_class_under(paludis_module(), "DependencySuggestedLabel", c_dependency_suggest_label);
- rb_funcall(c_dependency_suggested_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_recommended_label = rb_define_class_under(paludis_module(), "DependencyRecommendedLabel", c_dependency_suggest_label);
- rb_funcall(c_dependency_recommended_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_required_label = rb_define_class_under(paludis_module(), "DependencyRequiredLabel", c_dependency_suggest_label);
- rb_funcall(c_dependency_required_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_any_label = rb_define_class_under(paludis_module(), "DependencyAnyLabel", c_dependency_abis_label);
- rb_funcall(c_dependency_any_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_mine_label = rb_define_class_under(paludis_module(), "DependencyMineLabel", c_dependency_abis_label);
- rb_funcall(c_dependency_mine_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_primary_label = rb_define_class_under(paludis_module(), "DependencyPrimaryLabel", c_dependency_abis_label);
- rb_funcall(c_dependency_primary_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
-
- c_dependency_abi_label = rb_define_class_under(paludis_module(), "DependencyAbiLabel", c_dependency_abis_label);
- rb_funcall(c_dependency_abi_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
+ /*
+ * Document-class: Paludis::DependenciesLabel
+ *
+ * Dependencies label base class.
+ */
+ c_dependencies_label = rb_define_class_under(paludis_module(), "DependenciesLabel", rb_cObject);
+ rb_funcall(c_dependencies_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
+ rb_define_method(c_dependencies_label, "text", RUBY_FUNC_CAST(&dependencies_label_text), 0);
+ rb_define_method(c_dependencies_label, "to_s", RUBY_FUNC_CAST(&dependencies_label_text), 0);
+
+ c_dependencies_build_label = rb_define_class_under(paludis_module(), "DependenciesBuildLabel", c_dependencies_label);
+ c_dependencies_run_label = rb_define_class_under(paludis_module(), "DependenciesRunLabel", c_dependencies_label);
+ c_dependencies_post_label = rb_define_class_under(paludis_module(), "DependenciesPostLabel", c_dependencies_label);
+ c_dependencies_install_label = rb_define_class_under(paludis_module(), "DependenciesInstallLabel", c_dependencies_label);
+ c_dependencies_compile_against_label = rb_define_class_under(paludis_module(), "DependenciesCompileAgainstLabel", c_dependencies_label);
+ c_dependencies_fetch_label = rb_define_class_under(paludis_module(), "DependenciesFetchLabel", c_dependencies_label);
+ c_dependencies_suggestion_label = rb_define_class_under(paludis_module(), "DependenciesSuggestionLabel", c_dependencies_label);
+ c_dependencies_recommendation_label = rb_define_class_under(paludis_module(), "DependenciesRecommendationLabel", c_dependencies_label);
- c_active_dependency_labels = rb_define_class_under(paludis_module(), "ActiveDependencyLabels", rb_cObject);
- rb_define_singleton_method(c_active_dependency_labels, "new", RUBY_FUNC_CAST(&active_dependency_labels_new), -1);
- rb_define_method(c_active_dependency_labels, "initialize", RUBY_FUNC_CAST(&empty_init), -1);
- rb_define_method(c_active_dependency_labels, "system_labels", RUBY_FUNC_CAST((
- ActiveDependencyLabelsLabels<DependencySystemLabelSequence,
- &ActiveDependencyLabels::system_labels>::get)), 0);
- rb_define_method(c_active_dependency_labels, "type_labels", RUBY_FUNC_CAST((
- ActiveDependencyLabelsLabels<DependencyTypeLabelSequence,
- &ActiveDependencyLabels::type_labels>::get)), 0);
- rb_define_method(c_active_dependency_labels, "abi_labels", RUBY_FUNC_CAST((
- ActiveDependencyLabelsLabels<DependencyABIsLabelSequence,
- &ActiveDependencyLabels::abi_labels>::get)), 0);
- rb_define_method(c_active_dependency_labels, "suggest_labels", RUBY_FUNC_CAST((
- ActiveDependencyLabelsLabels<DependencySuggestLabelSequence,
- &ActiveDependencyLabels::suggest_labels>::get)), 0);
}
}
@@ -504,11 +271,11 @@ paludis::ruby::uri_label_to_value(const std::tr1::shared_ptr<const URILabel> & m
}
VALUE
-paludis::ruby::dependency_label_to_value(const std::tr1::shared_ptr<const DependencyLabel> & m)
+paludis::ruby::dependencies_label_to_value(const std::tr1::shared_ptr<const DependenciesLabel> & m)
{
try
{
- DependencyLabelToValue v(m);
+ DependenciesLabelToValue v(m);
m->accept(v);
return v.value;
}
@@ -518,42 +285,20 @@ paludis::ruby::dependency_label_to_value(const std::tr1::shared_ptr<const Depend
}
}
-std::tr1::shared_ptr<ActiveDependencyLabels>
-paludis::ruby::value_to_active_dependency_labels(VALUE v)
-{
- try
- {
- if (rb_obj_is_kind_of(v, c_active_dependency_labels))
- {
- std::tr1::shared_ptr<ActiveDependencyLabels> * ptr;
- Data_Get_Struct(v, std::tr1::shared_ptr<ActiveDependencyLabels>, ptr);
- return *ptr;
- }
- else
- {
- rb_raise(rb_eTypeError, "Can't convert %s into ActiveDependencyLabels", rb_obj_classname(v));
- }
- }
- catch (const std::exception & e)
- {
- exception_to_ruby_exception(e);
- }
-}
-
-std::tr1::shared_ptr<const DependencyLabel>
-paludis::ruby::value_to_dependency_label(VALUE v)
+std::tr1::shared_ptr<const DependenciesLabel>
+paludis::ruby::value_to_dependencies_label(VALUE v)
{
try
{
- if (rb_obj_is_kind_of(v, c_dependency_label))
+ if (rb_obj_is_kind_of(v, c_dependencies_label))
{
- std::tr1::shared_ptr<const DependencyLabel> * ptr;
- Data_Get_Struct(v, std::tr1::shared_ptr<const DependencyLabel>, ptr);
+ std::tr1::shared_ptr<const DependenciesLabel> * ptr;
+ Data_Get_Struct(v, std::tr1::shared_ptr<const DependenciesLabel>, ptr);
return *ptr;
}
else
{
- rb_raise(rb_eTypeError, "Can't convert %s into DependencyLabel", rb_obj_classname(v));
+ rb_raise(rb_eTypeError, "Can't convert %s into DependenciesLabel", rb_obj_classname(v));
}
}
catch (const std::exception & e)
diff --git a/ruby/dep_label_TEST.rb b/ruby/dep_label_TEST.rb
deleted file mode 100644
index f2a4c9f..0000000
--- a/ruby/dep_label_TEST.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env ruby
-# vim: set sw=4 sts=4 et tw=80 :
-#
-# Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
-# Copyright (c) 2007 Richard Brown
-#
-# This file is part of the Paludis package manager. Paludis is free software;
-# you can redistribute it and/or modify it under the terms of the GNU General
-# Public License version 2, as published by the Free Software Foundation.
-#
-# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-# details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA
-#
-
-require 'test/unit'
-require 'Paludis'
-
-module Paludis
- class TestCase_ActiveDependencyLabels < Test::Unit::TestCase
- def test_create
- a = ActiveDependencyLabels.new(DependencyLabelsDepSpec.new)
- a = ActiveDependencyLabels.new(a)
- a = ActiveDependencyLabels.new(a, DependencyLabelsDepSpec.new)
- a = ActiveDependencyLabels.new([])
- end
- end
-end
-
diff --git a/ruby/dep_spec.cc b/ruby/dep_spec.cc
index 05ff07f..bd2b071 100644
--- a/ruby/dep_spec.cc
+++ b/ruby/dep_spec.cc
@@ -43,7 +43,7 @@ namespace
static VALUE c_string_dep_spec;
static VALUE c_block_dep_spec;
- static VALUE c_dependency_labels_dep_spec;
+ static VALUE c_dependencies_labels_dep_spec;
static VALUE c_fetchable_uri_dep_spec;
static VALUE c_license_dep_spec;
static VALUE c_named_set_dep_spec;
@@ -122,7 +122,7 @@ namespace
WrappedSpec<BlockDepSpec>,
WrappedSpec<URILabelsDepSpec>,
WrappedSpec<PlainTextLabelDepSpec>,
- WrappedSpec<DependencyLabelsDepSpec>,
+ WrappedSpec<DependenciesLabelsDepSpec>,
WrappedSpec<NamedSetDepSpec>,
WrappedSpec<AllDepSpec>,
WrappedSpec<AnyDepSpec>,
@@ -226,10 +226,10 @@ namespace
klass = c_plain_text_label_dep_spec;
}
- void visit(const GenericSpecTree::NodeType<DependencyLabelsDepSpec>::Type & node)
+ void visit(const GenericSpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node)
{
- wrapped.reset(new WrappedSpec<DependencyLabelsDepSpec>(std::tr1::static_pointer_cast<DependencyLabelsDepSpec>(node.spec()->clone())));
- klass = c_dependency_labels_dep_spec;
+ wrapped.reset(new WrappedSpec<DependenciesLabelsDepSpec>(std::tr1::static_pointer_cast<DependenciesLabelsDepSpec>(node.spec()->clone())));
+ klass = c_dependencies_labels_dep_spec;
}
void visit(const GenericSpecTree::NodeType<NamedSetDepSpec>::Type & node)
@@ -435,17 +435,17 @@ namespace
}
VALUE
- dependency_labels_dep_spec_labels(VALUE self)
+ dependencies_labels_dep_spec_labels(VALUE self)
{
std::tr1::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::tr1::shared_ptr<WrappedSpecBase>, ptr);
- std::tr1::shared_ptr<const DependencyLabelsDepSpec> real_ptr(std::tr1::static_pointer_cast<const WrappedSpec<DependencyLabelsDepSpec> >(*ptr)->spec());
+ std::tr1::shared_ptr<const DependenciesLabelsDepSpec> real_ptr(std::tr1::static_pointer_cast<const WrappedSpec<DependenciesLabelsDepSpec> >(*ptr)->spec());
if (rb_block_given_p())
{
- for (DependencyLabelsDepSpec::ConstIterator it(real_ptr->begin()),
+ for (DependenciesLabelsDepSpec::ConstIterator it(real_ptr->begin()),
it_end(real_ptr->end()); it_end != it; ++it)
- rb_yield(dependency_label_to_value(*it));
+ rb_yield(dependencies_label_to_value(*it));
return Qnil;
}
@@ -453,9 +453,9 @@ namespace
{
VALUE result(rb_ary_new());
- for (DependencyLabelsDepSpec::ConstIterator it(real_ptr->begin()),
+ for (DependenciesLabelsDepSpec::ConstIterator it(real_ptr->begin()),
it_end(real_ptr->end()); it_end != it; ++it)
- rb_ary_push(result, dependency_label_to_value(*it));
+ rb_ary_push(result, dependencies_label_to_value(*it));
return result;
}
@@ -1098,7 +1098,7 @@ namespace
/*
* Document-class: Paludis::DepSpec
*
- * Base class for a dependency spec.
+ * Base class for a dependencies spec.
*/
c_dep_spec = rb_define_class_under(paludis_module(), "DepSpec", rb_cObject);
rb_funcall(c_dep_spec, rb_intern("private_class_method"), 1, rb_str_new2("new"));
@@ -1252,16 +1252,16 @@ namespace
rb_define_method(c_plain_text_dep_spec, "to_s", RUBY_FUNC_CAST(plain_text_dep_spec_to_s), 0);
/*
- * Document-class: Paludis::DependencyLabelsDepSpec
+ * Document-class: Paludis::DependenciesLabelsDepSpec
*
- * A DependencyLabelsDepSpec holds dependency labels.
+ * A DependenciesLabelsDepSpec holds dependencies labels.
*/
- c_dependency_labels_dep_spec = rb_define_class_under(paludis_module(), "DependencyLabelsDepSpec", c_string_dep_spec);
- rb_define_singleton_method(c_dependency_labels_dep_spec, "new", RUBY_FUNC_CAST(&DepSpecThings<DependencyLabelsDepSpec>::dep_spec_new_0), 0);
- rb_define_method(c_dependency_labels_dep_spec, "initialize", RUBY_FUNC_CAST(&dep_spec_init_0), 0);
- VALUE (* dependency_labels_dep_spec_to_s) (VALUE) = &dep_spec_to_s<DependencyLabelsDepSpec>;
- rb_define_method(c_dependency_labels_dep_spec, "to_s", RUBY_FUNC_CAST(dependency_labels_dep_spec_to_s), 0);
- rb_define_method(c_dependency_labels_dep_spec, "labels", RUBY_FUNC_CAST(&dependency_labels_dep_spec_labels), 0);
+ c_dependencies_labels_dep_spec = rb_define_class_under(paludis_module(), "DependenciesLabelsDepSpec", c_string_dep_spec);
+ rb_define_singleton_method(c_dependencies_labels_dep_spec, "new", RUBY_FUNC_CAST(&DepSpecThings<DependenciesLabelsDepSpec>::dep_spec_new_0), 0);
+ rb_define_method(c_dependencies_labels_dep_spec, "initialize", RUBY_FUNC_CAST(&dep_spec_init_0), 0);
+ VALUE (* dependencies_labels_dep_spec_to_s) (VALUE) = &dep_spec_to_s<DependenciesLabelsDepSpec>;
+ rb_define_method(c_dependencies_labels_dep_spec, "to_s", RUBY_FUNC_CAST(dependencies_labels_dep_spec_to_s), 0);
+ rb_define_method(c_dependencies_labels_dep_spec, "labels", RUBY_FUNC_CAST(&dependencies_labels_dep_spec_labels), 0);
/*
* Document-class: Paludis::URILabelsDepSpec
@@ -1363,18 +1363,18 @@ paludis::ruby::value_to_package_dep_spec(VALUE v)
}
}
-std::tr1::shared_ptr<const DependencyLabelsDepSpec>
-paludis::ruby::value_to_dependency_labels_dep_spec(VALUE v)
+std::tr1::shared_ptr<const DependenciesLabelsDepSpec>
+paludis::ruby::value_to_dependencies_labels_dep_spec(VALUE v)
{
- if (rb_obj_is_kind_of(v, c_dependency_labels_dep_spec))
+ if (rb_obj_is_kind_of(v, c_dependencies_labels_dep_spec))
{
std::tr1::shared_ptr<WrappedSpecBase> * v_ptr;
Data_Get_Struct(v, std::tr1::shared_ptr<WrappedSpecBase>, v_ptr);
- return std::tr1::static_pointer_cast<const WrappedSpec<DependencyLabelsDepSpec> >(*v_ptr)->spec();
+ return std::tr1::static_pointer_cast<const WrappedSpec<DependenciesLabelsDepSpec> >(*v_ptr)->spec();
}
else
{
- rb_raise(rb_eTypeError, "Can't convert %s into DependencyLabelsDepSpec", rb_obj_classname(v));
+ rb_raise(rb_eTypeError, "Can't convert %s into DependenciesLabelsDepSpec", rb_obj_classname(v));
}
}
@@ -1439,9 +1439,9 @@ paludis::ruby::dep_tree_to_value(const std::tr1::shared_ptr<const T_> & m)
}
VALUE *
-paludis::ruby::dependency_labels_dep_spec_value_ptr()
+paludis::ruby::dependencies_labels_dep_spec_value_ptr()
{
- return &c_dependency_labels_dep_spec;
+ return &c_dependencies_labels_dep_spec;
}
template VALUE paludis::ruby::dep_tree_to_value<SetSpecTree> (const std::tr1::shared_ptr<const SetSpecTree> &);
diff --git a/ruby/dep_spec_TEST.rb b/ruby/dep_spec_TEST.rb
index 5cbe074..968e9a7 100644
--- a/ruby/dep_spec_TEST.rb
+++ b/ruby/dep_spec_TEST.rb
@@ -414,13 +414,9 @@ module Paludis
def test_initial_labels
assert_kind_of Array, spec_key.initial_labels
- assert_kind_of DependencyBuildLabel, spec_key.initial_labels[0]
+ assert_kind_of DependenciesBuildLabel, spec_key.initial_labels[0]
assert_equal "DEPEND", spec_key.initial_labels[0].text
assert_equal "DEPEND", spec_key.initial_labels[0].to_s
-
- a = ActiveDependencyLabels.new spec_key.initial_labels
- assert_kind_of Array, a.type_labels
- assert_kind_of DependencyBuildLabel, a.type_labels[0]
end
end
end
diff --git a/ruby/metadata_key.cc b/ruby/metadata_key.cc
index 700e479..3305ae6 100644
--- a/ruby/metadata_key.cc
+++ b/ruby/metadata_key.cc
@@ -552,7 +552,7 @@ namespace
/*
* call-seq:
- * initial_labels -> Array of DependencyLabel
+ * initial_labels -> Array of DependenciesLabel
*
* Return the initial labels to use when deciding the behaviour of
* individual items in the heirarchy.
@@ -569,9 +569,9 @@ namespace
VALUE result(rb_ary_new());
- for (DependencyLabelSequence::ConstIterator it(real_self->initial_labels()->begin()),
+ for (DependenciesLabelSequence::ConstIterator it(real_self->initial_labels()->begin()),
it_end(real_self->initial_labels()->end()); it_end != it; ++it)
- rb_ary_push(result, dependency_label_to_value(*it));
+ rb_ary_push(result, dependencies_label_to_value(*it));
return result;
}
diff --git a/ruby/nice_names.nn b/ruby/nice_names.nn
index 0a9d012..d923538 100644
--- a/ruby/nice_names.nn
+++ b/ruby/nice_names.nn
@@ -29,7 +29,7 @@ make_nn_NiceNames() {
name "StringDepSpec"
name "NamedSetDepSpec"
name "URILabelsDepSpec"
- name "DependencyLabelsDepSpec"
+ name "DependenciesLabelsDepSpec"
name "PlainTextLabelDepSpec"
# paludis/dep_tree-fwd.hh
diff --git a/ruby/paludis_ruby.hh b/ruby/paludis_ruby.hh
index 5322252..93f6d21 100644
--- a/ruby/paludis_ruby.hh
+++ b/ruby/paludis_ruby.hh
@@ -102,7 +102,7 @@ namespace paludis
template <typename T_> std::tr1::shared_ptr<const T_> value_to_dep_tree(VALUE);
VALUE package_dep_spec_to_value(const std::tr1::shared_ptr<const PackageDepSpec> &);
VALUE uri_label_to_value(const std::tr1::shared_ptr<const URILabel> &);
- VALUE dependency_label_to_value(const std::tr1::shared_ptr<const DependencyLabel> &);
+ VALUE dependencies_label_to_value(const std::tr1::shared_ptr<const DependenciesLabel> &);
VALUE mask_to_value(std::tr1::shared_ptr<const Mask>);
VALUE choices_to_value(const std::tr1::shared_ptr<const Choices> & c);
VALUE choice_to_value(const std::tr1::shared_ptr<const Choice> & c);
@@ -113,7 +113,7 @@ namespace paludis
VersionSpec value_to_version_spec(VALUE v);
std::tr1::shared_ptr<const PackageID> value_to_package_id(VALUE);
std::tr1::shared_ptr<const PackageDepSpec> value_to_package_dep_spec(VALUE v);
- std::tr1::shared_ptr<const DependencyLabelsDepSpec> value_to_dependency_labels_dep_spec(VALUE v);
+ std::tr1::shared_ptr<const DependenciesLabelsDepSpec> value_to_dependencies_labels_dep_spec(VALUE v);
std::tr1::shared_ptr<const DepSpec> value_to_dep_spec(VALUE v);
std::tr1::shared_ptr<const DepTag> value_to_dep_tag(VALUE v);
QualifiedPackageName value_to_qualified_package_name(VALUE v);
@@ -126,10 +126,9 @@ namespace paludis
std::tr1::shared_ptr<const Choices> value_to_choices(VALUE v);
std::tr1::shared_ptr<const Choice> value_to_choice(VALUE v);
std::tr1::shared_ptr<const ChoiceValue> value_to_choice_value(VALUE v);
- std::tr1::shared_ptr<const DependencyLabel> value_to_dependency_label(VALUE v);
+ std::tr1::shared_ptr<const DependenciesLabel> value_to_dependencies_label(VALUE v);
MatchPackageOptions value_to_match_package_options(VALUE v);
bool value_to_bool(VALUE v);
- std::tr1::shared_ptr<ActiveDependencyLabels> value_to_active_dependency_labels(VALUE v);
Filter value_to_filter(VALUE v);
Selection value_to_selection(VALUE v);
@@ -143,7 +142,7 @@ namespace paludis
VALUE * uninstall_action_value_ptr();
VALUE * pretend_action_value_ptr();
VALUE * pretend_fetch_action_value_ptr();
- VALUE * dependency_labels_dep_spec_value_ptr();
+ VALUE * dependencies_labels_dep_spec_value_ptr();
#ifdef ENABLE_RUBY_QA
QACheckProperties value_to_qa_check_properties(VALUE);
diff --git a/src/clients/adjutrix/find_reverse_deps.cc b/src/clients/adjutrix/find_reverse_deps.cc
index 9bd661f..e666096 100644
--- a/src/clients/adjutrix/find_reverse_deps.cc
+++ b/src/clients/adjutrix/find_reverse_deps.cc
@@ -100,7 +100,7 @@ namespace
{
}
- void visit(const DependencySpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+ void visit(const DependencySpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
}
diff --git a/src/clients/cave/cmd_resolve.cc b/src/clients/cave/cmd_resolve.cc
index 15003f7..a91ee2a 100644
--- a/src/clients/cave/cmd_resolve.cc
+++ b/src/clients/cave/cmd_resolve.cc
@@ -69,143 +69,143 @@ using std::endl;
namespace
{
- struct IsSuggestionVisitor
+ struct LabelTypesVisitor
{
bool is_suggestion;
bool is_recommendation;
bool is_requirement;
+ bool seen_buildish_dep;
+ bool seen_runish_dep;
+ bool seen_compiled_against_dep;
- IsSuggestionVisitor() :
+ LabelTypesVisitor() :
is_suggestion(false),
is_recommendation(false),
- is_requirement(false)
+ is_requirement(false),
+ seen_buildish_dep(false),
+ seen_runish_dep(false),
+ seen_compiled_against_dep(false)
{
}
- void visit(const DependencyRequiredLabel &)
+ void visit(const DependenciesBuildLabel &)
{
is_requirement = true;
+ seen_buildish_dep = true;
}
- void visit(const DependencyRecommendedLabel &)
+ void visit(const DependenciesFetchLabel &)
{
- is_recommendation = true;
+ is_requirement = true;
+ seen_buildish_dep = true;
}
- void visit(const DependencySuggestedLabel &)
+ void visit(const DependenciesRunLabel &)
{
- is_suggestion = true;
+ is_requirement = true;
+ seen_runish_dep = true;
}
- };
- struct IsTypeDepVisitor
- {
- bool seen_buildish_dep;
- bool seen_runish_dep;
- bool seen_compiled_against_dep;
-
- IsTypeDepVisitor() :
- seen_buildish_dep(false),
- seen_runish_dep(false),
- seen_compiled_against_dep(false)
+ void visit(const DependenciesPostLabel &)
{
+ is_requirement = true;
+ seen_runish_dep = true;
}
- void visit(const DependencyBuildLabel &)
+ void visit(const DependenciesInstallLabel &)
{
+ is_requirement = true;
seen_buildish_dep = true;
}
- void visit(const DependencyRunLabel &)
+ void visit(const DependenciesCompileAgainstLabel &)
{
+ is_requirement = true;
seen_runish_dep = true;
+ seen_buildish_dep = true;
}
- void visit(const DependencyPostLabel &)
+ void visit(const DependenciesRecommendationLabel &)
{
+ is_recommendation = true;
seen_runish_dep = true;
}
- void visit(const DependencyInstallLabel &)
- {
- seen_buildish_dep = true;
- }
-
- void visit(const DependencyCompileLabel &)
+ void visit(const DependenciesSuggestionLabel &)
{
- seen_compiled_against_dep = true;
- seen_buildish_dep = true;
+ is_suggestion = true;
+ seen_runish_dep = true;
}
};
bool is_suggestion(const SanitisedDependency & dep)
{
- if (dep.active_dependency_labels()->suggest_labels()->empty())
+ if (dep.active_dependency_labels()->empty())
return false;
- IsSuggestionVisitor v;
- std::for_each(indirect_iterator(dep.active_dependency_labels()->suggest_labels()->begin()),
- indirect_iterator(dep.active_dependency_labels()->suggest_labels()->end()),
+ LabelTypesVisitor v;
+ std::for_each(indirect_iterator(dep.active_dependency_labels()->begin()),
+ indirect_iterator(dep.active_dependency_labels()->end()),
accept_visitor(v));
return v.is_suggestion && (! v.is_recommendation) && (! v.is_requirement);
}
bool is_recommendation(const SanitisedDependency & dep)
{
- if (dep.active_dependency_labels()->suggest_labels()->empty())
+ if (dep.active_dependency_labels()->empty())
return false;
- IsSuggestionVisitor v;
- std::for_each(indirect_iterator(dep.active_dependency_labels()->suggest_labels()->begin()),
- indirect_iterator(dep.active_dependency_labels()->suggest_labels()->end()),
+ LabelTypesVisitor v;
+ std::for_each(indirect_iterator(dep.active_dependency_labels()->begin()),
+ indirect_iterator(dep.active_dependency_labels()->end()),
accept_visitor(v));
return v.is_recommendation && (! v.is_requirement);
}
bool is_just_build_dep(const SanitisedDependency & dep)
{
- if (dep.active_dependency_labels()->type_labels()->empty())
+ if (dep.active_dependency_labels()->empty())
throw InternalError(PALUDIS_HERE, "not implemented");
- IsTypeDepVisitor v;
- std::for_each(indirect_iterator(dep.active_dependency_labels()->type_labels()->begin()),
- indirect_iterator(dep.active_dependency_labels()->type_labels()->end()),
+ LabelTypesVisitor v;
+ std::for_each(indirect_iterator(dep.active_dependency_labels()->begin()),
+ indirect_iterator(dep.active_dependency_labels()->end()),
accept_visitor(v));
return v.seen_buildish_dep && ! v.seen_runish_dep;
}
bool is_compiled_against_dep(const SanitisedDependency & dep)
{
- if (dep.active_dependency_labels()->type_labels()->empty())
+ if (dep.active_dependency_labels()->empty())
throw InternalError(PALUDIS_HERE, "not implemented");
- IsTypeDepVisitor v;
- std::for_each(indirect_iterator(dep.active_dependency_labels()->type_labels()->begin()),
- indirect_iterator(dep.active_dependency_labels()->type_labels()->end()),
+ LabelTypesVisitor v;
+ std::for_each(indirect_iterator(dep.active_dependency_labels()->begin()),
+ indirect_iterator(dep.active_dependency_labels()->end()),
accept_visitor(v));
return v.seen_compiled_against_dep;
}
bool is_buildish_dep(const SanitisedDependency & dep)
{
- if (dep.active_dependency_labels()->type_labels()->empty())
+ if (dep.active_dependency_labels()->empty())
throw InternalError(PALUDIS_HERE, "not implemented");
- IsTypeDepVisitor v;
- std::for_each(indirect_iterator(dep.active_dependency_labels()->type_labels()->begin()),
- indirect_iterator(dep.active_dependency_labels()->type_labels()->end()),
+ LabelTypesVisitor v;
+ std::for_each(indirect_iterator(dep.active_dependency_labels()->begin()),
+ indirect_iterator(dep.active_dependency_labels()->end()),
accept_visitor(v));
return v.seen_buildish_dep;
}
bool is_runish_dep(const SanitisedDependency & dep)
{
- if (dep.active_dependency_labels()->type_labels()->empty())
+ if (dep.active_dependency_labels()->empty())
throw InternalError(PALUDIS_HERE, "not implemented");
- IsTypeDepVisitor v;
- std::for_each(indirect_iterator(dep.active_dependency_labels()->type_labels()->begin()),
- indirect_iterator(dep.active_dependency_labels()->type_labels()->end()),
+ LabelTypesVisitor v;
+ std::for_each(indirect_iterator(dep.active_dependency_labels()->begin()),
+ indirect_iterator(dep.active_dependency_labels()->end()),
accept_visitor(v));
return v.seen_runish_dep;
}
diff --git a/src/clients/cave/cmd_resolve_dump.cc b/src/clients/cave/cmd_resolve_dump.cc
index 252300f..c0cdd08 100644
--- a/src/clients/cave/cmd_resolve_dump.cc
+++ b/src/clients/cave/cmd_resolve_dump.cc
@@ -111,18 +111,8 @@ namespace
ss << d.metadata_key_raw_name() << " ";
ss << d.spec();
- if (! d.active_dependency_labels()->system_labels()->empty())
- ss << " system { " << join(indirect_iterator(d.active_dependency_labels()->system_labels()->begin()),
- indirect_iterator(d.active_dependency_labels()->system_labels()->end()), ", ") << " }";
- if (! d.active_dependency_labels()->type_labels()->empty())
- ss << " type { " << join(indirect_iterator(d.active_dependency_labels()->type_labels()->begin()),
- indirect_iterator(d.active_dependency_labels()->type_labels()->end()), ", ") << " }";
- if (! d.active_dependency_labels()->abi_labels()->empty())
- ss << " abi { " << join(indirect_iterator(d.active_dependency_labels()->abi_labels()->begin()),
- indirect_iterator(d.active_dependency_labels()->abi_labels()->end()), ", ") << " }";
- if (! d.active_dependency_labels()->suggest_labels()->empty())
- ss << " suggest { " << join(indirect_iterator(d.active_dependency_labels()->suggest_labels()->begin()),
- indirect_iterator(d.active_dependency_labels()->suggest_labels()->end()), ", ") << " }";
+ ss << " { " << join(indirect_iterator(d.active_dependency_labels()->begin()),
+ indirect_iterator(d.active_dependency_labels()->end()), ", ") << " }";
ss << ")";
diff --git a/src/clients/cave/colour_formatter.cc b/src/clients/cave/colour_formatter.cc
index 1e02a62..7ef2e18 100644
--- a/src/clients/cave/colour_formatter.cc
+++ b/src/clients/cave/colour_formatter.cc
@@ -227,7 +227,7 @@ ColourFormatter::format(const PackageDepSpec & s, const format::Installable &) c
}
std::string
-ColourFormatter::format(const DependencyLabelsDepSpec & s, const format::Plain &) const
+ColourFormatter::format(const DependenciesLabelsDepSpec & s, const format::Plain &) const
{
return format_general_s(f::colour_formatter_dependency_labels_dep_spec_plain(), stringify(s));
}
diff --git a/src/clients/cave/colour_formatter.hh b/src/clients/cave/colour_formatter.hh
index 6c8ff90..a96b861 100644
--- a/src/clients/cave/colour_formatter.hh
+++ b/src/clients/cave/colour_formatter.hh
@@ -38,7 +38,7 @@ namespace paludis
public CanFormat<FetchableURIDepSpec>,
public CanFormat<URILabelsDepSpec>,
public CanFormat<PackageDepSpec>,
- public CanFormat<DependencyLabelsDepSpec>,
+ public CanFormat<DependenciesLabelsDepSpec>,
public CanFormat<BlockDepSpec>,
public CanFormat<NamedSetDepSpec>,
public CanFormat<PlainTextLabelDepSpec>,
@@ -95,7 +95,7 @@ namespace paludis
std::string format(const PackageDepSpec &, const format::Installed &) const;
std::string format(const PackageDepSpec &, const format::Installable &) const;
- std::string format(const DependencyLabelsDepSpec &, const format::Plain &) const;
+ std::string format(const DependenciesLabelsDepSpec &, const format::Plain &) const;
std::string format(const BlockDepSpec &, const format::Plain &) const;
diff --git a/src/clients/inquisitio/key_extractor.cc b/src/clients/inquisitio/key_extractor.cc
index 2252d63..25c6553 100644
--- a/src/clients/inquisitio/key_extractor.cc
+++ b/src/clients/inquisitio/key_extractor.cc
@@ -166,7 +166,7 @@ namespace
result |= _m(stringify(*node.spec()));
}
- void visit(const GenericSpecTree::NodeType<DependencyLabelsDepSpec>::Type & node)
+ void visit(const GenericSpecTree::NodeType<DependenciesLabelsDepSpec>::Type & node)
{
if (! result)
result |= _m(stringify(*node.spec()));
diff --git a/src/output/colour_formatter.cc b/src/output/colour_formatter.cc
index 20781a8..9d49641 100644
--- a/src/output/colour_formatter.cc
+++ b/src/output/colour_formatter.cc
@@ -201,7 +201,7 @@ ColourFormatter::format(const NamedSetDepSpec & f, const format::Plain &) const
}
std::string
-ColourFormatter::format(const DependencyLabelsDepSpec & f, const format::Plain &) const
+ColourFormatter::format(const DependenciesLabelsDepSpec & f, const format::Plain &) const
{
return stringify(f);
}
diff --git a/src/output/colour_formatter.hh b/src/output/colour_formatter.hh
index a323a63..391dc5c 100644
--- a/src/output/colour_formatter.hh
+++ b/src/output/colour_formatter.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -31,7 +31,7 @@ class ColourFormatter :
public paludis::CanFormat<paludis::ConditionalDepSpec>,
public paludis::CanFormat<paludis::PackageDepSpec>,
public paludis::CanFormat<paludis::BlockDepSpec>,
- public paludis::CanFormat<paludis::DependencyLabelsDepSpec>,
+ public paludis::CanFormat<paludis::DependenciesLabelsDepSpec>,
public paludis::CanFormat<paludis::URILabelsDepSpec>,
public paludis::CanFormat<paludis::PlainTextDepSpec>,
public paludis::CanFormat<paludis::SimpleURIDepSpec>,
@@ -81,7 +81,7 @@ class ColourFormatter :
std::string format(const paludis::URILabelsDepSpec &, const paludis::format::Plain &) const;
- std::string format(const paludis::DependencyLabelsDepSpec &, const paludis::format::Plain &) const;
+ std::string format(const paludis::DependenciesLabelsDepSpec &, const paludis::format::Plain &) const;
std::string format(const paludis::FetchableURIDepSpec &, const paludis::format::Plain &) const;
diff --git a/src/output/console_query_task.cc b/src/output/console_query_task.cc
index 0dc7937..bbbbc9d 100644
--- a/src/output/console_query_task.cc
+++ b/src/output/console_query_task.cc
@@ -936,7 +936,7 @@ namespace
{
}
- void visit(const GenericSpecTree::NodeType<DependencyLabelsDepSpec>::Type &)
+ void visit(const GenericSpecTree::NodeType<DependenciesLabelsDepSpec>::Type &)
{
}
};