aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-12 00:50:11 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-12 01:12:11 +0100
commit1bbf308315fc7c0d1e571586df9368460f3b787d (patch)
tree22c15fdfccfc1c504f1afdc5dc2451e2e5303460
parentc87b7d1425a65754ca48ff5b95859ac5686aea0d (diff)
downloadpaludis-1bbf308315fc7c0d1e571586df9368460f3b787d.tar.gz
paludis-1bbf308315fc7c0d1e571586df9368460f3b787d.tar.xz
No need for metadata provide keys
-rw-r--r--doc/api/cplusplus/examples/example_metadata_key.cc6
-rw-r--r--paludis/metadata_key.cc1
-rw-r--r--paludis/metadata_key.hh1
-rw-r--r--paludis/user_dep_spec.cc13
-rw-r--r--python/additional_tests.cc1
-rw-r--r--python/metadata_key.cc6
-rwxr-xr-xpython/metadata_key_TEST.py28
-rw-r--r--ruby/metadata_key.cc15
-rw-r--r--ruby/package_id_TEST.rb2
-rwxr-xr-xsrc/clients/cave/cmd_display_resolution.cc6
-rw-r--r--src/clients/cave/cmd_info.cc6
-rw-r--r--src/clients/cave/cmd_match.cc6
-rw-r--r--src/clients/cave/cmd_show.cc16
-rw-r--r--src/clients/cave/format_plain_metadata_key.cc5
-rw-r--r--src/clients/instruo/instruo.cc5
15 files changed, 1 insertions, 116 deletions
diff --git a/doc/api/cplusplus/examples/example_metadata_key.cc b/doc/api/cplusplus/examples/example_metadata_key.cc
index db98d2c..f660ad1 100644
--- a/doc/api/cplusplus/examples/example_metadata_key.cc
+++ b/doc/api/cplusplus/examples/example_metadata_key.cc
@@ -128,12 +128,6 @@ namespace
cout << indent << left << setw(30) << " Value:" << " " << key.pretty_print_value(UnformattedPrettyPrinter(), { }) << endl;
}
- void visit(const MetadataSpecTreeKey<ProvideSpecTree> & key)
- {
- cout << indent << left << setw(30) << " Class:" << " " << "MetadataSpecTreeKey<ProvideSpecTree>" << endl;
- cout << indent << left << setw(30) << " Value:" << " " << key.pretty_print_value(UnformattedPrettyPrinter(), { }) << endl;
- }
-
void visit(const MetadataSpecTreeKey<LicenseSpecTree> & key)
{
cout << indent << left << setw(30) << " Class:" << " " << "MetadataSpecTreeKey<LicenseSpecTree>" << endl;
diff --git a/paludis/metadata_key.cc b/paludis/metadata_key.cc
index 3a8c15c..3056b63 100644
--- a/paludis/metadata_key.cc
+++ b/paludis/metadata_key.cc
@@ -75,7 +75,6 @@ template class MetadataCollectionKey<PackageIDSequence>;
template class MetadataCollectionKey<FSPathSequence>;
template class MetadataSpecTreeKey<LicenseSpecTree>;
-template class MetadataSpecTreeKey<ProvideSpecTree>;
template class MetadataSpecTreeKey<PlainTextSpecTree>;
template class MetadataSpecTreeKey<RequiredUseSpecTree>;
#ifndef PALUDIS_NO_EXPLICIT_FULLY_SPECIALISED
diff --git a/paludis/metadata_key.hh b/paludis/metadata_key.hh
index 080f576..396edcb 100644
--- a/paludis/metadata_key.hh
+++ b/paludis/metadata_key.hh
@@ -96,7 +96,6 @@ namespace paludis
MetadataSpecTreeKey<LicenseSpecTree>,
MetadataSpecTreeKey<FetchableURISpecTree>,
MetadataSpecTreeKey<SimpleURISpecTree>,
- MetadataSpecTreeKey<ProvideSpecTree>,
MetadataSpecTreeKey<PlainTextSpecTree>,
MetadataSpecTreeKey<RequiredUseSpecTree>,
MetadataValueKey<std::string>,
diff --git a/paludis/user_dep_spec.cc b/paludis/user_dep_spec.cc
index d8f45ba..ab3ec11 100644
--- a/paludis/user_dep_spec.cc
+++ b/paludis/user_dep_spec.cc
@@ -718,19 +718,6 @@ namespace
return false;
}
- bool visit(const MetadataSpecTreeKey<ProvideSpecTree> & s) const
- {
- switch (op)
- {
- case '=':
- return false;
- case '<':
- return s.parse_value()->top()->accept_returning<bool>(SpecTreeSearcher(env, id, pattern));
- }
-
- return false;
- }
-
bool visit(const MetadataSpecTreeKey<SimpleURISpecTree> & s) const
{
switch (op)
diff --git a/python/additional_tests.cc b/python/additional_tests.cc
index 6f906da..a9671ff 100644
--- a/python/additional_tests.cc
+++ b/python/additional_tests.cc
@@ -222,7 +222,6 @@ void expose_additional_tests()
bp::def("test_metadata_keyword_name_set_key", &metadata_key::test_metadata_set_key<KeywordNameSet>);
bp::def("test_metadata_string_set_key", &metadata_key::test_metadata_set_key<Set<std::string> >);
bp::def("test_metadata_license_spec_tree_key", &metadata_key::test_metadata_spec_tree_key<LicenseSpecTree>);
- bp::def("test_metadata_provide_spec_tree_key", &metadata_key::test_metadata_spec_tree_key<ProvideSpecTree>);
bp::def("test_metadata_dependency_spec_tree_key", &metadata_key::test_metadata_spec_tree_key<DependencySpecTree>);
bp::def("test_metadata_plain_text_spec_tree_key", &metadata_key::test_metadata_spec_tree_key<PlainTextSpecTree>);
bp::def("test_metadata_fetchable_uri_spec_tree_key", &metadata_key::test_metadata_spec_tree_key<FetchableURISpecTree>);
diff --git a/python/metadata_key.cc b/python/metadata_key.cc
index 6a2dc0e..4b36283 100644
--- a/python/metadata_key.cc
+++ b/python/metadata_key.cc
@@ -120,11 +120,6 @@ class MetadataKeySptrToPythonVisitor
obj = bp::object(std::static_pointer_cast<const MetadataSpecTreeKey<LicenseSpecTree> >(_m_ptr));
}
- void visit(const MetadataSpecTreeKey<ProvideSpecTree> & k)
- {
- obj = bp::object(std::static_pointer_cast<const MetadataSpecTreeKey<ProvideSpecTree> >(_m_ptr));
- }
-
void visit(const MetadataSpecTreeKey<DependencySpecTree> & k)
{
obj = bp::object(std::static_pointer_cast<const MetadataSpecTreeKey<DependencySpecTree> >(_m_ptr));
@@ -1236,7 +1231,6 @@ void expose_metadata_key()
* MetadataSpecTreeKeys
*/
class_spec_tree_key<LicenseSpecTree>("LicenseSpecTree");
- class_spec_tree_key<ProvideSpecTree>("ProvideSpecTree");
class_spec_tree_key<DependencySpecTree>("DependencySpecTree");
class_spec_tree_key<PlainTextSpecTree>("PlainTextSpecTree");
class_spec_tree_key<RequiredUseSpecTree>("RequiredUseSpecTree");
diff --git a/python/metadata_key_TEST.py b/python/metadata_key_TEST.py
index f5fbbb6..776fdc6 100755
--- a/python/metadata_key_TEST.py
+++ b/python/metadata_key_TEST.py
@@ -219,34 +219,6 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
test_metadata_license_spec_tree_key(TestKey())
- def test_11_provide_spec_tree(self):
- class TestKey(MetadataProvideSpecTreeKey):
- def __init__(self):
- MetadataProvideSpecTreeKey.__init__(self)
- self.e = NoConfigEnvironment(repo_path, "/var/empty")
-
- def parse_value(self):
- return AllDepSpec()
-
- def pretty_print(self, f):
- pds = parse_user_package_dep_spec("cat/pkg", self.e, [])
- return f.format_package_dep_spec_plain(pds)
-
- def pretty_print_flat(self, f):
- pds = parse_user_package_dep_spec("cat/pkg", self.e, [])
- return f.format_package_dep_spec_plain(pds)
-
- def raw_name(self):
- return "raw"
-
- def human_name(self):
- return "human"
-
- def type(self):
- return MetadataKeyType.NORMAL
-
- test_metadata_provide_spec_tree_key(TestKey())
-
def test_12_dependency_spec_tree(self):
class TestKey(MetadataDependencySpecTreeKey):
def __init__(self):
diff --git a/ruby/metadata_key.cc b/ruby/metadata_key.cc
index 43bfb20..3ae3097 100644
--- a/ruby/metadata_key.cc
+++ b/ruby/metadata_key.cc
@@ -50,7 +50,6 @@ namespace
static VALUE c_metadata_fsentry_key;
static VALUE c_metadata_fsentry_sequence_key;
static VALUE c_metadata_key_type;
- static VALUE c_metadata_provide_spec_tree_key;
static VALUE c_metadata_license_spec_tree_key;
static VALUE c_metadata_fetchable_uri_spec_tree_key;
static VALUE c_metadata_simple_uri_spec_tree_key;
@@ -206,12 +205,6 @@ namespace
new std::shared_ptr<const MetadataKey>(mm));
}
- void visit(const MetadataSpecTreeKey<ProvideSpecTree> &)
- {
- value = Data_Wrap_Struct(c_metadata_provide_spec_tree_key, 0, &Common<std::shared_ptr<const MetadataKey> >::free,
- new std::shared_ptr<const MetadataKey>(mm));
- }
-
void visit(const MetadataSpecTreeKey<DependencySpecTree> &)
{
value = Data_Wrap_Struct(c_metadata_dependency_spec_tree_key, 0, &Common<std::shared_ptr<const MetadataKey> >::free,
@@ -768,14 +761,6 @@ namespace
rb_define_method(c_metadata_license_spec_tree_key, "parse_value", RUBY_FUNC_CAST((&SpecTreeValue<LicenseSpecTree>::fetch)), 0);
/*
- * Document-class: Paludis::MetadataProvideSpecTreeKey
- *
- * Metadata class for provide specs.
- */
- c_metadata_provide_spec_tree_key = rb_define_class_under(paludis_module(), "MetadataProvideSpecTreeKey", c_metadata_key);
- rb_define_method(c_metadata_provide_spec_tree_key, "parse_value", RUBY_FUNC_CAST((&SpecTreeValue<ProvideSpecTree>::fetch)), 0);
-
- /*
* Document-class: Paludis::MetadataPlainTextSpecTreeKey
*
* Metadata class for restrict specs.
diff --git a/ruby/package_id_TEST.rb b/ruby/package_id_TEST.rb
index 2c2e8d9..d30348d 100644
--- a/ruby/package_id_TEST.rb
+++ b/ruby/package_id_TEST.rb
@@ -157,7 +157,7 @@ module Paludis
def test_each_metadata
keys = { "DESCRIPTION" => 1, "INHERITED" => 1, "KEYWORDS" => 1, "EAPI" => 1,
- "DEPEND" => 1, "RDEPEND" => 1, "PDEPEND" => 1, "LICENSE" => 1, "PROVIDE" => 1,
+ "DEPEND" => 1, "RDEPEND" => 1, "PDEPEND" => 1, "LICENSE" => 1,
"RESTRICT" => 1, "SRC_URI" => 1, "HOMEPAGE" => 1, "EBUILD" => 1, "IUSE" => 1,
"PALUDIS_CHOICES" => 1, "DEFINED_PHASES" => 1, "SLOT" => 1 }
pid_testrepo.each_metadata do | key |
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index 7831794..09abb2d 100755
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -989,12 +989,6 @@ namespace
cout << fuc(fs_mask_by(), fv<'i'>(indent), fv<'k'>(k.human_name()), fv<'v'>(stringify(k.pretty_print_value(printer, { }))));
}
- void visit(const MetadataSpecTreeKey<ProvideSpecTree> & k)
- {
- ColourPrettyPrinter printer(env, id, 0);
- cout << fuc(fs_mask_by(), fv<'i'>(indent), fv<'k'>(k.human_name()), fv<'v'>(stringify(k.pretty_print_value(printer, { }))));
- }
-
void visit(const MetadataSpecTreeKey<PlainTextSpecTree> & k)
{
ColourPrettyPrinter printer(env, id, 0);
diff --git a/src/clients/cave/cmd_info.cc b/src/clients/cave/cmd_info.cc
index 7eb5fb2..9401851 100644
--- a/src/clients/cave/cmd_info.cc
+++ b/src/clients/cave/cmd_info.cc
@@ -228,12 +228,6 @@ namespace
cout << fuc(fs_metadata(), fv<'h'>(k.human_name()), fv<'i'>(std::string(indent, ' ')), fv<'s'>(k.pretty_print_value(printer, { })));
}
- void visit(const MetadataSpecTreeKey<ProvideSpecTree> & k)
- {
- ColourPrettyPrinter printer(env, make_null_shared_ptr(), indent);
- cout << fuc(fs_metadata(), fv<'h'>(k.human_name()), fv<'i'>(std::string(indent, ' ')), fv<'s'>(k.pretty_print_value(printer, { })));
- }
-
void visit(const MetadataSpecTreeKey<DependencySpecTree> & k)
{
ColourPrettyPrinter printer(env, make_null_shared_ptr(), indent);
diff --git a/src/clients/cave/cmd_match.cc b/src/clients/cave/cmd_match.cc
index 69e55a1..d39d835 100644
--- a/src/clients/cave/cmd_match.cc
+++ b/src/clients/cave/cmd_match.cc
@@ -321,12 +321,6 @@ namespace
k.parse_value()->top()->accept(m);
}
- void visit(const MetadataSpecTreeKey<ProvideSpecTree> & k)
- {
- SpecTreeAsString m = { env, id, texts, match_options };
- k.parse_value()->top()->accept(m);
- }
-
void visit(const MetadataSpecTreeKey<SimpleURISpecTree> & k)
{
SpecTreeAsString m = { env, id, texts, match_options };
diff --git a/src/clients/cave/cmd_show.cc b/src/clients/cave/cmd_show.cc
index 0adbc26..8f1c3dc 100644
--- a/src/clients/cave/cmd_show.cc
+++ b/src/clients/cave/cmd_show.cc
@@ -644,22 +644,6 @@ namespace
}
}
- void visit(const MetadataSpecTreeKey<ProvideSpecTree> & k)
- {
- if (cmdline.a_complex_keys.specified() || important)
- {
- ColourPrettyPrinter printer(env.get(), maybe_current_id, indent);
- out << fuc(
- (cmdline.a_raw_names.specified() ? fs_metadata_value_raw() : fs_metadata_value_human()),
- fv<'s'>(cmdline.a_raw_names.specified() ? k.raw_name() : k.human_name()),
- fv<'v'>(k.pretty_print_value(printer, basic_ppos)),
- fv<'i'>(std::string(indent, ' ')),
- fv<'b'>(important ? "true" : ""),
- fv<'p'>("")
- );
- }
- }
-
void visit(const MetadataSpecTreeKey<DependencySpecTree> & k)
{
if (cmdline.a_complex_keys.specified() || important)
diff --git a/src/clients/cave/format_plain_metadata_key.cc b/src/clients/cave/format_plain_metadata_key.cc
index fcdbd5a..528c00c 100644
--- a/src/clients/cave/format_plain_metadata_key.cc
+++ b/src/clients/cave/format_plain_metadata_key.cc
@@ -90,11 +90,6 @@ namespace
s << k.pretty_print_value(UnformattedPrettyPrinter(), { });
}
- void visit(const MetadataSpecTreeKey<ProvideSpecTree> & k)
- {
- s << k.pretty_print_value(UnformattedPrettyPrinter(), { });
- }
-
void visit(const MetadataSpecTreeKey<FetchableURISpecTree> & k)
{
s << k.pretty_print_value(UnformattedPrettyPrinter(), { });
diff --git a/src/clients/instruo/instruo.cc b/src/clients/instruo/instruo.cc
index 67ab6ee..880d9bf 100644
--- a/src/clients/instruo/instruo.cc
+++ b/src/clients/instruo/instruo.cc
@@ -112,11 +112,6 @@ namespace
const std::shared_ptr<const RequiredUseSpecTree> & PALUDIS_ATTRIBUTE((unused)) t(k.parse_value());
}
- void visit(const MetadataSpecTreeKey<ProvideSpecTree> & k)
- {
- const std::shared_ptr<const ProvideSpecTree> & PALUDIS_ATTRIBUTE((unused)) t(k.parse_value());
- }
-
void visit(const MetadataSpecTreeKey<FetchableURISpecTree> & k)
{
const std::shared_ptr<const FetchableURISpecTree> & PALUDIS_ATTRIBUTE((unused)) t(k.parse_value());