aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-09-21 19:58:25 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-09-21 19:58:25 +0000
commitd504ed45adc497c17a56b4b28366d13d640aed4c (patch)
tree2e5831638f87208372aa12203bcb8cd78bbb94ee
parentcdf6d749ed3d1aea5085d32b04450233f36986ba (diff)
downloadpaludis-d504ed45adc497c17a56b4b28366d13d640aed4c.tar.gz
paludis-d504ed45adc497c17a56b4b28366d13d640aed4c.tar.xz
Kill global use_key, inherited_key
-rw-r--r--paludis/dep_list/override_functions.cc6
-rw-r--r--paludis/dep_tag.cc1
-rw-r--r--paludis/metadata_key.cc2
-rw-r--r--paludis/metadata_key.hh2
-rw-r--r--paludis/name-fwd.hh7
-rw-r--r--paludis/package_id.hh2
-rw-r--r--paludis/repositories/cran/cran_package_id.cc12
-rw-r--r--paludis/repositories/cran/cran_package_id.hh2
-rw-r--r--paludis/repositories/e/e_key.cc8
-rw-r--r--paludis/repositories/e/e_key.hh4
-rw-r--r--paludis/repositories/e/ebuild_id.cc8
-rw-r--r--paludis/repositories/e/ebuild_id.hh4
-rw-r--r--paludis/repositories/e/qa/spec_keys.cc2
-rw-r--r--paludis/repositories/e/vdb_id.cc4
-rw-r--r--paludis/repositories/e/vdb_id.hh5
-rw-r--r--paludis/repositories/e/vdb_repository.cc4
-rw-r--r--paludis/repositories/fake/fake_package_id.cc12
-rw-r--r--paludis/repositories/fake/fake_package_id.hh2
-rw-r--r--paludis/repositories/gems/gem_specification.cc12
-rw-r--r--paludis/repositories/gems/gem_specification.hh2
-rw-r--r--paludis/repositories/gems/gem_specification_TEST.cc2
-rw-r--r--paludis/repositories/virtuals/package_id.cc12
-rw-r--r--paludis/repositories/virtuals/package_id.hh2
-rw-r--r--python/additional_tests.cc2
-rw-r--r--python/metadata_key.cc7
-rwxr-xr-xpython/metadata_key_TEST.py12
-rw-r--r--python/name.cc6
-rw-r--r--ruby/package_id.cc18
-rw-r--r--ruby/package_id_TEST.rb29
-rw-r--r--src/clients/instruo/instruo.cc7
-rw-r--r--src/clients/qualudis/qualudis.cc2
-rw-r--r--src/output/console_query_task.cc2
32 files changed, 62 insertions, 140 deletions
diff --git a/paludis/dep_list/override_functions.cc b/paludis/dep_list/override_functions.cc
index 4cd54d9..bb6ed7a 100644
--- a/paludis/dep_list/override_functions.cc
+++ b/paludis/dep_list/override_functions.cc
@@ -89,7 +89,7 @@ namespace
{
}
- void visit(const MetadataSetKey<InheritedSet> &)
+ void visit(const MetadataSetKey<Set<std::string> > &)
{
}
@@ -216,7 +216,7 @@ namespace
{
}
- void visit(const MetadataSetKey<InheritedSet> &)
+ void visit(const MetadataSetKey<Set<std::string> > &)
{
}
@@ -369,7 +369,7 @@ namespace
{
}
- void visit(const MetadataSetKey<InheritedSet> &)
+ void visit(const MetadataSetKey<Set<std::string> > &)
{
}
diff --git a/paludis/dep_tag.cc b/paludis/dep_tag.cc
index c36434f..15b613b 100644
--- a/paludis/dep_tag.cc
+++ b/paludis/dep_tag.cc
@@ -19,6 +19,7 @@
#include "dep_tag.hh"
#include <paludis/dep_spec.hh>
+#include <paludis/dep_label.hh>
#include <paludis/util/virtual_constructor-impl.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
diff --git a/paludis/metadata_key.cc b/paludis/metadata_key.cc
index 01ac455..9ae97c8 100644
--- a/paludis/metadata_key.cc
+++ b/paludis/metadata_key.cc
@@ -116,7 +116,7 @@ MetadataSpecTreeKey<C_>::MetadataSpecTreeKey(const std::string & r, const std::s
template class MetadataSetKey<KeywordNameSet>;
template class MetadataSetKey<IUseFlagSet>;
-template class MetadataSetKey<InheritedSet>;
+template class MetadataSetKey<Set<std::string> >;
template class MetadataSetKey<UseFlagNameSet>;
template class MetadataSetKey<PackageIDSequence>;
diff --git a/paludis/metadata_key.hh b/paludis/metadata_key.hh
index c02f308..4b71621 100644
--- a/paludis/metadata_key.hh
+++ b/paludis/metadata_key.hh
@@ -44,7 +44,7 @@ namespace paludis
MetadataSetKey<UseFlagNameSet>,
MetadataSetKey<IUseFlagSet>,
MetadataSetKey<KeywordNameSet>,
- MetadataSetKey<InheritedSet>,
+ MetadataSetKey<Set<std::string> >,
MetadataSetKey<PackageIDSequence>,
MetadataSpecTreeKey<DependencySpecTree>,
MetadataSpecTreeKey<LicenseSpecTree>,
diff --git a/paludis/name-fwd.hh b/paludis/name-fwd.hh
index e42b30b..2eed76e 100644
--- a/paludis/name-fwd.hh
+++ b/paludis/name-fwd.hh
@@ -183,13 +183,6 @@ namespace paludis
* \ingroup grpnames
*/
typedef Set<IUseFlag> IUseFlagSet;
-
- /**
- * A collection of inherited packages.
- *
- * \ingroup grpnames
- */
- typedef Set<std::string> InheritedSet;
}
#endif
diff --git a/paludis/package_id.hh b/paludis/package_id.hh
index 38200aa..df2a667 100644
--- a/paludis/package_id.hh
+++ b/paludis/package_id.hh
@@ -68,9 +68,7 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const = 0;
virtual const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> > keywords_key() const = 0;
- virtual const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use_key() const = 0;
virtual const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> > iuse_key() const = 0;
- virtual const tr1::shared_ptr<const MetadataSetKey<InheritedSet> > inherited_key() const = 0;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const = 0;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const = 0;
virtual const tr1::shared_ptr<const MetadataSetKey<PackageIDSequence> > contains_key() const = 0;
diff --git a/paludis/repositories/cran/cran_package_id.cc b/paludis/repositories/cran/cran_package_id.cc
index 9b498c5..e6ad4a4 100644
--- a/paludis/repositories/cran/cran_package_id.cc
+++ b/paludis/repositories/cran/cran_package_id.cc
@@ -319,24 +319,12 @@ CRANPackageID::keywords_key() const
return tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> >();
}
-const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >
-CRANPackageID::use_key() const
-{
- return tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >();
-}
-
const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> >
CRANPackageID::iuse_key() const
{
return tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> >();
}
-const tr1::shared_ptr<const MetadataSetKey<InheritedSet> >
-CRANPackageID::inherited_key() const
-{
- return tr1::shared_ptr<const MetadataSetKey<InheritedSet> >();
-}
-
const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> >
CRANPackageID::license_key() const
{
diff --git a/paludis/repositories/cran/cran_package_id.hh b/paludis/repositories/cran/cran_package_id.hh
index 2ec4425..e4cb9d3 100644
--- a/paludis/repositories/cran/cran_package_id.hh
+++ b/paludis/repositories/cran/cran_package_id.hh
@@ -57,9 +57,7 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
virtual const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> > keywords_key() const;
- virtual const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use_key() const;
virtual const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> > iuse_key() const;
- virtual const tr1::shared_ptr<const MetadataSetKey<InheritedSet> > inherited_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc
index e1d9d9f..2ad9abe 100644
--- a/paludis/repositories/e/e_key.cc
+++ b/paludis/repositories/e/e_key.cc
@@ -667,7 +667,7 @@ namespace paludis
const tr1::shared_ptr<const ERepositoryID> id;
const std::string string_value;
mutable Mutex value_mutex;
- mutable tr1::shared_ptr<InheritedSet> value;
+ mutable tr1::shared_ptr<Set<std::string> > value;
Implementation(const tr1::shared_ptr<const ERepositoryID> & i, const std::string & v) :
id(i),
@@ -679,7 +679,7 @@ namespace paludis
EInheritedKey::EInheritedKey(const tr1::shared_ptr<const ERepositoryID> & id,
const std::string & r, const std::string & h, const std::string & v, const MetadataKeyType t) :
- MetadataSetKey<InheritedSet>(r, h, t),
+ MetadataSetKey<Set<std::string> >(r, h, t),
PrivateImplementationPattern<EInheritedKey>(new Implementation<EInheritedKey>(id, v)),
_imp(PrivateImplementationPattern<EInheritedKey>::_imp.get())
{
@@ -689,7 +689,7 @@ EInheritedKey::~EInheritedKey()
{
}
-const tr1::shared_ptr<const InheritedSet>
+const tr1::shared_ptr<const Set<std::string> >
EInheritedKey::value() const
{
Lock l(_imp->value_mutex);
@@ -697,7 +697,7 @@ EInheritedKey::value() const
if (_imp->value)
return _imp->value;
- _imp->value.reset(new InheritedSet);
+ _imp->value.reset(new Set<std::string>);
Context context("When parsing metadata key '" + raw_name() + "' from '" + stringify(*_imp->id) + "':");
WhitespaceTokeniser::get_instance()->tokenise(_imp->string_value, _imp->value->inserter());
return _imp->value;
diff --git a/paludis/repositories/e/e_key.hh b/paludis/repositories/e/e_key.hh
index ac473bb..22c6712 100644
--- a/paludis/repositories/e/e_key.hh
+++ b/paludis/repositories/e/e_key.hh
@@ -229,7 +229,7 @@ namespace paludis
};
class EInheritedKey :
- public MetadataSetKey<InheritedSet>,
+ public MetadataSetKey<Set<std::string> >,
private PrivateImplementationPattern<EInheritedKey>
{
private:
@@ -240,7 +240,7 @@ namespace paludis
const std::string &, const std::string &, const std::string &, const MetadataKeyType);
~EInheritedKey();
- const tr1::shared_ptr<const InheritedSet> value() const
+ const tr1::shared_ptr<const Set<std::string> > value() const
PALUDIS_ATTRIBUTE((warn_unused_result));
};
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 87a0b44..3746a28 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -494,12 +494,6 @@ EbuildID::keywords_key() const
return _imp->keywords;
}
-const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >
-EbuildID::use_key() const
-{
- return tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >();
-}
-
const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> >
EbuildID::iuse_key() const
{
@@ -612,7 +606,7 @@ EbuildID::binary_origin_key() const
return tr1::shared_ptr<const MetadataStringKey>();
}
-const tr1::shared_ptr<const MetadataSetKey<InheritedSet> >
+const tr1::shared_ptr<const MetadataSetKey<Set<std::string> > >
EbuildID::inherited_key() const
{
return _imp->inherited;
diff --git a/paludis/repositories/e/ebuild_id.hh b/paludis/repositories/e/ebuild_id.hh
index b458896..685c454 100644
--- a/paludis/repositories/e/ebuild_id.hh
+++ b/paludis/repositories/e/ebuild_id.hh
@@ -66,9 +66,7 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
virtual const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> > keywords_key() const;
- virtual const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use_key() const;
virtual const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> > iuse_key() const;
- virtual const tr1::shared_ptr<const MetadataSetKey<InheritedSet> > inherited_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
@@ -89,6 +87,8 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataPackageIDKey> contained_in_key() const;
virtual const tr1::shared_ptr<const MetadataFSEntryKey> fs_location_key() const;
+ const tr1::shared_ptr<const MetadataSetKey<Set<std::string> > > inherited_key() const;
+
virtual bool arbitrary_less_than_comparison(const PackageID &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/e/qa/spec_keys.cc b/paludis/repositories/e/qa/spec_keys.cc
index 858fbb1..bbe504a 100644
--- a/paludis/repositories/e/qa/spec_keys.cc
+++ b/paludis/repositories/e/qa/spec_keys.cc
@@ -278,7 +278,7 @@ namespace
{
}
- void visit(const MetadataSetKey<InheritedSet> &)
+ void visit(const MetadataSetKey<Set<std::string> > &)
{
}
diff --git a/paludis/repositories/e/vdb_id.cc b/paludis/repositories/e/vdb_id.cc
index 649414a..6a02434 100644
--- a/paludis/repositories/e/vdb_id.cc
+++ b/paludis/repositories/e/vdb_id.cc
@@ -73,7 +73,7 @@ namespace paludis
tr1::shared_ptr<const MetadataFSEntryKey> fs_location;
tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use;
- tr1::shared_ptr<const MetadataSetKey<InheritedSet> > inherited;
+ tr1::shared_ptr<const MetadataSetKey<Set<std::string> > > inherited;
tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> > iuse;
tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license;
tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide;
@@ -460,7 +460,7 @@ VDBID::iuse_key() const
return _imp->iuse;
}
-const tr1::shared_ptr<const MetadataSetKey<InheritedSet> >
+const tr1::shared_ptr<const MetadataSetKey<Set<std::string> > >
VDBID::inherited_key() const
{
need_keys_added();
diff --git a/paludis/repositories/e/vdb_id.hh b/paludis/repositories/e/vdb_id.hh
index 483329f..dca106c 100644
--- a/paludis/repositories/e/vdb_id.hh
+++ b/paludis/repositories/e/vdb_id.hh
@@ -60,8 +60,6 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
virtual const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> > keywords_key() const;
- virtual const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use_key() const;
- virtual const tr1::shared_ptr<const MetadataSetKey<InheritedSet> > inherited_key() const;
virtual const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> > iuse_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
@@ -83,6 +81,9 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataPackageIDKey> contained_in_key() const;
virtual const tr1::shared_ptr<const MetadataFSEntryKey> fs_location_key() const;
+ const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use_key() const;
+ const tr1::shared_ptr<const MetadataSetKey<Set<std::string> > > inherited_key() const;
+
virtual bool supports_action(const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual void perform_action(Action &) const;
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 2e30535..0e32ceb 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -260,10 +260,10 @@ VDBRepository::do_query_use(const UseFlagName & f, const PackageID & e) const
{
Lock l(*_imp->big_nasty_mutex);
- if (! e.use_key())
+ if (! static_cast<const VDBID *>(&e)->use_key())
return use_unspecified;
- if (e.use_key()->value()->end() != e.use_key()->value()->find(f))
+ if (static_cast<const VDBID *>(&e)->use_key()->value()->end() != static_cast<const VDBID *>(&e)->use_key()->value()->find(f))
return use_enabled;
else
return use_disabled;
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index 5716662..ece4476 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -392,18 +392,6 @@ FakePackageID::iuse_key() const
return _imp->iuse;
}
-const tr1::shared_ptr<const MetadataSetKey<InheritedSet> >
-FakePackageID::inherited_key() const
-{
- return tr1::shared_ptr<const MetadataSetKey<InheritedSet> >();
-}
-
-const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >
-FakePackageID::use_key() const
-{
- return tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >();
-}
-
const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> >
FakePackageID::license_key() const
{
diff --git a/paludis/repositories/fake/fake_package_id.hh b/paludis/repositories/fake/fake_package_id.hh
index 2a0d5ca..a9bd7cd 100644
--- a/paludis/repositories/fake/fake_package_id.hh
+++ b/paludis/repositories/fake/fake_package_id.hh
@@ -144,9 +144,7 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
virtual const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> > keywords_key() const;
- virtual const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use_key() const;
virtual const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> > iuse_key() const;
- virtual const tr1::shared_ptr<const MetadataSetKey<InheritedSet> > inherited_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
diff --git a/paludis/repositories/gems/gem_specification.cc b/paludis/repositories/gems/gem_specification.cc
index 167f517..78f178a 100644
--- a/paludis/repositories/gems/gem_specification.cc
+++ b/paludis/repositories/gems/gem_specification.cc
@@ -409,18 +409,6 @@ GemSpecification::iuse_key() const
return tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> >();
}
-const tr1::shared_ptr<const MetadataSetKey<InheritedSet> >
-GemSpecification::inherited_key() const
-{
- return tr1::shared_ptr<const MetadataSetKey<InheritedSet> >();
-}
-
-const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >
-GemSpecification::use_key() const
-{
- return tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >();
-}
-
const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> >
GemSpecification::license_key() const
{
diff --git a/paludis/repositories/gems/gem_specification.hh b/paludis/repositories/gems/gem_specification.hh
index aba3467..71b03a6 100644
--- a/paludis/repositories/gems/gem_specification.hh
+++ b/paludis/repositories/gems/gem_specification.hh
@@ -93,8 +93,6 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
virtual const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> > keywords_key() const;
virtual const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> > iuse_key() const;
- virtual const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use_key() const;
- virtual const tr1::shared_ptr<const MetadataSetKey<InheritedSet> > inherited_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
diff --git a/paludis/repositories/gems/gem_specification_TEST.cc b/paludis/repositories/gems/gem_specification_TEST.cc
index 95e9fa4..650f982 100644
--- a/paludis/repositories/gems/gem_specification_TEST.cc
+++ b/paludis/repositories/gems/gem_specification_TEST.cc
@@ -60,7 +60,7 @@ namespace
{
}
- void visit(const MetadataSetKey<InheritedSet> &)
+ void visit(const MetadataSetKey<Set<std::string> > &)
{
}
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index 02e3d70..ab44c44 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -237,18 +237,6 @@ VirtualsPackageID::iuse_key() const
return tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> >();
}
-const tr1::shared_ptr<const MetadataSetKey<InheritedSet> >
-VirtualsPackageID::inherited_key() const
-{
- return tr1::shared_ptr<const MetadataSetKey<InheritedSet> >();
-}
-
-const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >
-VirtualsPackageID::use_key() const
-{
- return tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >();
-}
-
const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> >
VirtualsPackageID::license_key() const
{
diff --git a/paludis/repositories/virtuals/package_id.hh b/paludis/repositories/virtuals/package_id.hh
index f74eade..b4da2ee 100644
--- a/paludis/repositories/virtuals/package_id.hh
+++ b/paludis/repositories/virtuals/package_id.hh
@@ -94,9 +94,7 @@ namespace paludis
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
virtual const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> > keywords_key() const;
- virtual const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> > use_key() const;
virtual const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> > iuse_key() const;
- virtual const tr1::shared_ptr<const MetadataSetKey<InheritedSet> > inherited_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<ProvideSpecTree> > provide_key() const;
virtual const tr1::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > build_dependencies_key() const;
diff --git a/python/additional_tests.cc b/python/additional_tests.cc
index 7f3b96c..109b7ef 100644
--- a/python/additional_tests.cc
+++ b/python/additional_tests.cc
@@ -213,7 +213,7 @@ void expose_additional_tests()
bp::def("test_metadata_keyword_name_set_key", &metadata_key::test_metadata_set_key<KeywordNameSet>);
bp::def("test_metadata_use_flag_name_set_key", &metadata_key::test_metadata_set_key<UseFlagNameSet>);
bp::def("test_metadata_iuse_flag_set_key", &metadata_key::test_metadata_set_key<IUseFlagSet>);
- bp::def("test_metadata_inherited_set_key", &metadata_key::test_metadata_set_key<InheritedSet>);
+ 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>);
diff --git a/python/metadata_key.cc b/python/metadata_key.cc
index 85ee4cf..c746990 100644
--- a/python/metadata_key.cc
+++ b/python/metadata_key.cc
@@ -88,9 +88,9 @@ class MetadataKeySptrToPythonVisitor :
obj = bp::object(tr1::static_pointer_cast<const MetadataSetKey<IUseFlagSet> >(_m_ptr));
}
- void visit(const MetadataSetKey<InheritedSet> & k)
+ void visit(const MetadataSetKey<Set<std::string> > & k)
{
- obj = bp::object(tr1::static_pointer_cast<const MetadataSetKey<InheritedSet> >(_m_ptr));
+ obj = bp::object(tr1::static_pointer_cast<const MetadataSetKey<Set<std::string> > >(_m_ptr));
}
void visit(const MetadataSpecTreeKey<LicenseSpecTree> & k)
@@ -560,7 +560,7 @@ void expose_metadata_key()
class_set_key<KeywordNameSet>("KeywordNameIterable");
class_set_key<UseFlagNameSet>("UseFlagNameIterable");
class_set_key<IUseFlagSet>("IUseFlagIterable");
- class_set_key<InheritedSet>("InheritedIterable");
+ class_set_key<Set<std::string> >("StringIterable");
/**
* MetadataSpecTreeKeys
@@ -571,3 +571,4 @@ void expose_metadata_key()
class_spec_tree_key<RestrictSpecTree>("RestrictSpecTree");
class_spec_tree_key<URISpecTree>("URISpecTree");
}
+
diff --git a/python/metadata_key_TEST.py b/python/metadata_key_TEST.py
index d9a13d5..663f0fc 100755
--- a/python/metadata_key_TEST.py
+++ b/python/metadata_key_TEST.py
@@ -62,8 +62,8 @@ class TestCase_01_MetadataKeys(unittest.TestCase):
self.assert_(isinstance(self.ipid.find_metadata("IUSE"), MetadataIUseFlagIterableKey))
def test_07_inherited(self):
- self.assert_(isinstance(self.pid.find_metadata("INHERITED"), MetadataInheritedIterableKey))
- self.assert_(isinstance(self.ipid.find_metadata("INHERITED"), MetadataInheritedIterableKey))
+ self.assert_(isinstance(self.pid.find_metadata("INHERITED"), MetadataStringIterableKey))
+ self.assert_(isinstance(self.ipid.find_metadata("INHERITED"), MetadataStringIterableKey))
def test_08_depend(self):
self.assert_(isinstance(self.pid.find_metadata("DEPEND"), MetadataDependencySpecTreeKey))
@@ -153,15 +153,15 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
test_metadata_iuse_flag_set_key(TestKey())
- def test_09_inherited_iterable(self):
- class TestKey(MetadataInheritedIterableKey):
+ def test_09_string_iterable(self):
+ class TestKey(MetadataStringIterableKey):
def __init__(self):
- MetadataInheritedIterableKey.__init__(self, "raw", "human", MetadataKeyType.NORMAL)
+ MetadataStringIterableKey.__init__(self, "raw", "human", MetadataKeyType.NORMAL)
def value(self):
return ["keyword"]
- test_metadata_inherited_set_key(TestKey())
+ test_metadata_string_set_key(TestKey())
def test_10_license_spec_tree(self):
class TestKey(MetadataLicenseSpecTreeKey):
diff --git a/python/name.cc b/python/name.cc
index 386fe77..e84aa33 100644
--- a/python/name.cc
+++ b/python/name.cc
@@ -201,11 +201,11 @@ void expose_name()
);
/**
- * InheritedIterable
+ * StringSetIterable
*/
- class_iterable<InheritedSet>
+ class_iterable<Set<std::string> >
(
- "InheritedIterable",
+ "StringSetIterable",
"Iterable of string",
true
);
diff --git a/ruby/package_id.cc b/ruby/package_id.cc
index a10e311..6dcfae8 100644
--- a/ruby/package_id.cc
+++ b/ruby/package_id.cc
@@ -44,7 +44,7 @@ namespace
static VALUE c_metadata_keyword_name_set_key;
static VALUE c_metadata_use_flag_name_set_key;
static VALUE c_metadata_iuse_flag_set_key;
- static VALUE c_metadata_inherited_set_key;
+ static VALUE c_metadata_string_set_key;
static VALUE c_metadata_package_id_sequence_key;
static VALUE c_metadata_key_type;
static VALUE c_repository_mask_info;
@@ -113,10 +113,10 @@ namespace
new tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> >(tr1::static_pointer_cast<const MetadataSetKey<IUseFlagSet> >(mm)));
}
- void visit(const MetadataSetKey<InheritedSet> &)
+ void visit(const MetadataSetKey<Set<std::string> > &)
{
- value = Data_Wrap_Struct(c_metadata_inherited_set_key, 0, &Common<tr1::shared_ptr<const MetadataSetKey<InheritedSet> > >::free,
- new tr1::shared_ptr<const MetadataSetKey<InheritedSet> >(tr1::static_pointer_cast<const MetadataSetKey<InheritedSet> >(mm)));
+ value = Data_Wrap_Struct(c_metadata_string_set_key, 0, &Common<tr1::shared_ptr<const MetadataSetKey<Set<std::string> > > >::free,
+ new tr1::shared_ptr<const MetadataSetKey<Set<std::string> > >(tr1::static_pointer_cast<const MetadataSetKey<Set<std::string> > >(mm)));
}
void visit(const MetadataSetKey<PackageIDSequence> &)
@@ -532,9 +532,7 @@ namespace
rb_define_method(c_package_id, "[]", RUBY_FUNC_CAST(&package_id_subscript), 1);
rb_define_method(c_package_id, "each_metadata", RUBY_FUNC_CAST(&package_id_each_metadata), 0);
rb_define_method(c_package_id, "keywords_key", RUBY_FUNC_CAST((&KeyValue<MetadataSetKey<KeywordNameSet>,&PackageID::keywords_key>::fetch)), 0);
- rb_define_method(c_package_id, "use_key", RUBY_FUNC_CAST((&KeyValue<MetadataSetKey<UseFlagNameSet>,&PackageID::use_key>::fetch)), 0);
rb_define_method(c_package_id, "iuse_key", RUBY_FUNC_CAST((&KeyValue<MetadataSetKey<IUseFlagSet>,&PackageID::iuse_key>::fetch)), 0);
- rb_define_method(c_package_id, "inherited_key", RUBY_FUNC_CAST((&KeyValue<MetadataSetKey<InheritedSet>,&PackageID::inherited_key>::fetch)), 0);
rb_define_method(c_package_id, "short_description_key", RUBY_FUNC_CAST((&KeyValue<MetadataStringKey,&PackageID::short_description_key>::fetch)), 0);
rb_define_method(c_package_id, "long_description_key", RUBY_FUNC_CAST((&KeyValue<MetadataStringKey,&PackageID::long_description_key>::fetch)), 0);
rb_define_method(c_package_id, "contents_key", RUBY_FUNC_CAST((&KeyValue<MetadataContentsKey,&PackageID::contents_key>::fetch)), 0);
@@ -638,12 +636,12 @@ namespace
rb_define_method(c_metadata_iuse_flag_set_key, "value", RUBY_FUNC_CAST((&SetValue<IUseFlagSet>::fetch)), 0);
/*
- * Document-class: Paludis::MetadataInheritedSetKey
+ * Document-class: Paludis::MetadataStringSetKey
*
- * Metadata class for Inherited
+ * Metadata class for String sets
*/
- c_metadata_inherited_set_key = rb_define_class_under(paludis_module(), "MetadataInheritedSetKey", c_metadata_key);
- rb_define_method(c_metadata_inherited_set_key, "value", RUBY_FUNC_CAST((&SetValue<InheritedSet>::fetch)), 0);
+ c_metadata_string_set_key = rb_define_class_under(paludis_module(), "MetadataStringSetKey", c_metadata_key);
+ rb_define_method(c_metadata_string_set_key, "value", RUBY_FUNC_CAST((&SetValue<Set<std::string> >::fetch)), 0);
/*
* Document-module: Paludis::MetadataKeyType
diff --git a/ruby/package_id_TEST.rb b/ruby/package_id_TEST.rb
index e59fdd9..19ac357 100644
--- a/ruby/package_id_TEST.rb
+++ b/ruby/package_id_TEST.rb
@@ -52,7 +52,8 @@ module Paludis
include TestStuff
def classes
- [MetadataStringKey, MetadataContentsKey, MetadataTimeKey, MetadataUseFlagNameSetKey, MetadataKeywordNameSetKey, MetadataIUseFlagSetKey, MetadataInheritedSetKey]
+ [MetadataStringKey, MetadataContentsKey, MetadataTimeKey, MetadataUseFlagNameSetKey, MetadataKeywordNameSetKey,
+ MetadataIUseFlagSetKey, MetadataStringSetKey]
end
def all_classes
@@ -105,7 +106,7 @@ module Paludis
def test_members
[:name, :version, :slot, :repository_name, :==, :keywords_key,
- :use_key, :iuse_key, :inherited_key, :short_description_key,
+ :iuse_key, :short_description_key,
:long_description_key, :contents_key, :installed_time_key,
:source_origin_key, :binary_origin_key].each do |method|
@@ -193,10 +194,7 @@ module Paludis
end
def test_use_key
- assert_nil pid_testrepo.use_key
- #assert_kind_of MetadataUseFlagNameSetKey, pid_testrepo.use_key
- #assert_kind_of Array, pid_testrepo.use_key.value
- #assert_equal ['test'], pid_testrepo.use_key.value
+ assert_nil pid_testrepo["USE"]
end
def test_iuse_key
@@ -205,13 +203,6 @@ module Paludis
assert_equal ['testflag'], pid_testrepo.iuse_key.value
end
- def test_inherited_key
- assert_nil pid_testrepo.inherited_key
- #assert_kind_of MetadataInheritSetKey, pid_testrepo.inherited_key
- #assert_kind_of Array, pid_testrepo.iuse_key.value
- #assert_equal ['testflag'], pid_testrepo.iuse_key.value
- end
-
def test_repository_mask_info_keys
assert_kind_of MetadataRepositoryMaskInfoKey, pid_testrepo["repository_mask"]
assert_kind_of RepositoryMaskInfo, pid_testrepo["repository_mask"].value
@@ -277,9 +268,9 @@ module Paludis
end
def test_use_key
- assert_kind_of MetadataUseFlagNameSetKey, pid_installed.use_key
- assert_kind_of Array, pid_installed.use_key.value
- assert_equal ['test', 'test_use'], pid_installed.use_key.value
+ assert_kind_of MetadataUseFlagNameSetKey, pid_installed["USE"]
+ assert_kind_of Array, pid_installed["USE"].value
+ assert_equal ['test', 'test_use'], pid_installed["USE"].value
end
def test_iuse_key
@@ -289,9 +280,9 @@ module Paludis
end
def test_inherited_key
- assert_kind_of MetadataInheritedSetKey, pid_installed.inherited_key
- assert_kind_of Array, pid_installed.inherited_key.value
- assert_equal ['test_inherited'], pid_installed.inherited_key.value
+ assert_kind_of MetadataStringSetKey, pid_installed["INHERITED"]
+ assert_kind_of Array, pid_installed["INHERITED"].value
+ assert_equal ['test_inherited'], pid_installed["INHERITED"].value
end
end
end
diff --git a/src/clients/instruo/instruo.cc b/src/clients/instruo/instruo.cc
index 3f3014a..3a94ad8 100644
--- a/src/clients/instruo/instruo.cc
+++ b/src/clients/instruo/instruo.cc
@@ -30,6 +30,7 @@
#include <paludis/util/map.hh>
#include <paludis/util/tr1_functional.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/set.hh>
#include <paludis/environments/no_config/no_config_environment.hh>
#include <paludis/package_database.hh>
#include <paludis/query.hh>
@@ -106,7 +107,7 @@ namespace
{
}
- void visit(const MetadataSetKey<InheritedSet> &)
+ void visit(const MetadataSetKey<Set<std::string> > &)
{
}
@@ -186,9 +187,9 @@ namespace
const tr1::shared_ptr<const PackageIDSequence> & PALUDIS_ATTRIBUTE((unused)) s(k.value());
}
- void visit(const MetadataSetKey<InheritedSet> & k)
+ void visit(const MetadataSetKey<Set<std::string> > & k)
{
- const tr1::shared_ptr<const InheritedSet> & PALUDIS_ATTRIBUTE((unused)) s(k.value());
+ const tr1::shared_ptr<const Set<std::string> > & PALUDIS_ATTRIBUTE((unused)) s(k.value());
}
void visit(const MetadataSetKey<KeywordNameSet> & k)
diff --git a/src/clients/qualudis/qualudis.cc b/src/clients/qualudis/qualudis.cc
index 13c3276..4760d19 100644
--- a/src/clients/qualudis/qualudis.cc
+++ b/src/clients/qualudis/qualudis.cc
@@ -65,7 +65,7 @@ namespace
stream << k.raw_name() << ": " << join(k.value()->begin(), k.value()->end(), " ") << "\n";
}
- void visit(const MetadataSetKey<InheritedSet> & k)
+ void visit(const MetadataSetKey<Set<std::string> > & k)
{
stream << k.raw_name() << ": " << join(k.value()->begin(), k.value()->end(), " ") << "\n";
}
diff --git a/src/output/console_query_task.cc b/src/output/console_query_task.cc
index c6d4b11..27b7e2d 100644
--- a/src/output/console_query_task.cc
+++ b/src/output/console_query_task.cc
@@ -194,7 +194,7 @@ namespace
id, k.value());
}
- void visit(const MetadataSetKey<InheritedSet> & k)
+ void visit(const MetadataSetKey<Set<std::string> > & k)
{
if (k.type() == type)
task->display_metadata_key(k.human_name(), k.raw_name(), join(k.value()->begin(), k.value()->end(), " "));