aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-07-07 20:12:38 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-07-07 20:12:38 +0000
commit3d2fa0643b99b6e8244000ce3a6070a992663add (patch)
tree30fcdc2256418219e8ddd0e04f2f75f0037e2e49
parentaf2eea64f30591c10e35f96be65ef859e9afda64 (diff)
downloadpaludis-3d2fa0643b99b6e8244000ce3a6070a992663add.tar.gz
paludis-3d2fa0643b99b6e8244000ce3a6070a992663add.tar.xz
Fix up gems
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc24
-rw-r--r--paludis/repositories/cran/cran_installed_repository.hh15
-rw-r--r--paludis/repositories/cran/cran_repository.cc26
-rw-r--r--paludis/repositories/cran/cran_repository.hh8
-rw-r--r--paludis/repositories/cran/cran_repository_TEST.cc8
-rw-r--r--paludis/repositories/gems/gem_specification.cc16
-rw-r--r--paludis/repositories/gems/gem_specification.hh8
-rw-r--r--paludis/repositories/gems/gem_specification_TEST.cc8
-rw-r--r--paludis/repositories/gems/gems_repository.cc30
-rw-r--r--paludis/repositories/gems/gems_repository.hh4
-rw-r--r--paludis/repositories/gems/installed_gems_repository.cc30
-rw-r--r--paludis/repositories/gems/installed_gems_repository.hh4
-rw-r--r--paludis/repositories/gems/registration.cc5
-rw-r--r--paludis/repositories/gems/yaml.cc1
14 files changed, 95 insertions, 92 deletions
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index 016f621..0c0158c 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -29,13 +29,15 @@
#include <paludis/repositories/cran/cran_package_id.hh>
#include <paludis/repositories/cran/cran_dep_parser.hh>
#include <paludis/repositories/cran/cran_installed_repository.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/fs_entry.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/util/system.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/map.hh>
+#include <paludis/util/set.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/tokeniser.hh>
@@ -151,7 +153,6 @@ CRANInstalledRepository::CRANInstalledRepository(const CRANInstalledRepositoryPa
.mask_interface(0)
.installable_interface(0)
.installed_interface(this)
- .contents_interface(this)
.sets_interface(this)
.syncable_interface(0)
.uninstallable_interface(this)
@@ -164,7 +165,8 @@ CRANInstalledRepository::CRANInstalledRepository(const CRANInstalledRepositoryPa
.config_interface(0)
.destination_interface(this)
.licenses_interface(0)
- .portage_interface(0)
+ .e_interface(0)
+ .qa_interface(0)
.make_virtuals_interface(0)
.pretend_interface(0)
.hook_interface(0),
@@ -203,21 +205,21 @@ CRANInstalledRepository::do_has_package_named(const QualifiedPackageName & q) co
return _imp->ids.end() != _imp->ids.find(q);
}
-tr1::shared_ptr<const CategoryNamePartCollection>
+tr1::shared_ptr<const CategoryNamePartSet>
CRANInstalledRepository::do_category_names() const
{
- tr1::shared_ptr<CategoryNamePartCollection> result(new CategoryNamePartCollection::Concrete);
+ tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
result->insert(CategoryNamePart("cran"));
return result;
}
-tr1::shared_ptr<const QualifiedPackageNameCollection>
+tr1::shared_ptr<const QualifiedPackageNameSet>
CRANInstalledRepository::do_package_names(const CategoryNamePart & c) const
{
Context context("When fetching package names in category '" + stringify(c)
+ "' in " + stringify(name()) + ":");
- tr1::shared_ptr<QualifiedPackageNameCollection> result(new QualifiedPackageNameCollection::Concrete);
+ tr1::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
if (! do_has_category_named(c))
return result;
@@ -235,7 +237,7 @@ CRANInstalledRepository::do_package_ids(const QualifiedPackageName & n) const
Context context("When fetching versions of '" + stringify(n) + "' in "
+ stringify(name()) + ":");
- tr1::shared_ptr<PackageIDSequence> result(new PackageIDSequence::Concrete);
+ tr1::shared_ptr<PackageIDSequence> result(new PackageIDSequence);
if (! do_has_package_named(n))
return result;
@@ -367,7 +369,7 @@ CRANInstalledRepository::do_installed_time(const QualifiedPackageName & q,
tr1::shared_ptr<Repository>
CRANInstalledRepository::make_cran_installed_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m)
+ tr1::shared_ptr<const Map<std::string, std::string> > m)
{
Context context("When making CRAN installed repository from repo_file '" +
(m->end() == m->find("repo_file") ? std::string("?") : m->find("repo_file")->second) + "':");
@@ -475,12 +477,12 @@ CRANInstalledRepository::do_package_set(const SetName & s) const
return tr1::shared_ptr<SetSpecTree::ConstItem>();
}
-tr1::shared_ptr<const SetNameCollection>
+tr1::shared_ptr<const SetNameSet>
CRANInstalledRepository::sets_list() const
{
Context context("While generating the list of sets:");
- tr1::shared_ptr<SetNameCollection> result(new SetNameCollection::Concrete);
+ tr1::shared_ptr<SetNameSet> result(new SetNameSet);
result->insert(SetName("everything"));
result->insert(SetName("world"));
return result;
diff --git a/paludis/repositories/cran/cran_installed_repository.hh b/paludis/repositories/cran/cran_installed_repository.hh
index d704291..92f7de0 100644
--- a/paludis/repositories/cran/cran_installed_repository.hh
+++ b/paludis/repositories/cran/cran_installed_repository.hh
@@ -25,6 +25,7 @@
#include <paludis/util/attributes.hh>
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/fs_entry.hh>
+#include <paludis/util/map-fwd.hh>
/** \file
* Declarations for CRANInstalledRepository.
@@ -46,7 +47,6 @@ namespace paludis
class PALUDIS_VISIBLE CRANInstalledRepository :
public Repository,
public RepositoryInstalledInterface,
- public RepositoryContentsInterface,
public RepositoryUninstallableInterface,
public RepositorySetsInterface,
public RepositoryWorldInterface,
@@ -63,11 +63,11 @@ namespace paludis
const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const QualifiedPackageNameCollection> do_package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartCollection> do_category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool do_has_package_named(const QualifiedPackageName &) const
@@ -81,11 +81,6 @@ namespace paludis
virtual time_t do_installed_time(const PackageID &)
const PALUDIS_ATTRIBUTE((warn_unused_result));
- /* RepositoryContentsInterface */
-
- virtual tr1::shared_ptr<const Contents> do_contents(const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
/* RepositoryUninstallableInterface */
virtual void do_uninstall(const tr1::shared_ptr<const PackageID> &, const UninstallOptions &) const;
@@ -106,7 +101,7 @@ namespace paludis
*/
static tr1::shared_ptr<Repository> make_cran_installed_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m);
+ tr1::shared_ptr<const Map<std::string, std::string> > m);
/**
* Destructor.
@@ -121,7 +116,7 @@ namespace paludis
/* RepositorySetsInterface */
- virtual tr1::shared_ptr<const SetNameCollection> sets_list() const
+ virtual tr1::shared_ptr<const SetNameSet> sets_list() const
PALUDIS_ATTRIBUTE((warn_unused_result));
/* RepositoryWorldInterface */
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index 6546bce..bfed041 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -26,12 +26,14 @@
#include <paludis/repositories/cran/cran_repository.hh>
#include <paludis/repositories/repository_maker.hh>
#include <paludis/repository_info.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/dir_iterator.hh>
+#include <paludis/util/set.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/join.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/map.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/strip.hh>
@@ -106,10 +108,10 @@ CRANRepository::CRANRepository(const CRANRepositoryParams & p) :
.destination_interface(0)
.virtuals_interface(0)
.config_interface(0)
- .contents_interface(0)
.licenses_interface(0)
- .portage_interface(0)
+ .e_interface(0)
.pretend_interface(0)
+ .qa_interface(0)
.hook_interface(0),
"cran"),
PrivateImplementationPattern<CRANRepository>(new Implementation<CRANRepository>(p))
@@ -148,24 +150,24 @@ CRANRepository::do_has_package_named(const QualifiedPackageName & q) const
return _imp->ids.end() != _imp->ids.find(q);
}
-tr1::shared_ptr<const CategoryNamePartCollection>
+tr1::shared_ptr<const CategoryNamePartSet>
CRANRepository::do_category_names() const
{
Context context("When fetching category names in " + stringify(name()) + ":");
- tr1::shared_ptr<CategoryNamePartCollection> result(new CategoryNamePartCollection::Concrete);
+ tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
result->insert(CategoryNamePart("cran"));
return result;
}
-tr1::shared_ptr<const QualifiedPackageNameCollection>
+tr1::shared_ptr<const QualifiedPackageNameSet>
CRANRepository::do_package_names(const CategoryNamePart & c) const
{
Context context("When fetching package names in category '" + stringify(c)
+ "' in " + stringify(name()) + ":");
- tr1::shared_ptr<QualifiedPackageNameCollection> result(new QualifiedPackageNameCollection::Concrete);
+ tr1::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
if (! do_has_category_named(c))
return result;
@@ -183,7 +185,7 @@ CRANRepository::do_package_ids(const QualifiedPackageName & n) const
Context context("When fetching versions of '" + stringify(n) + "' in "
+ stringify(name()) + ":");
- tr1::shared_ptr<PackageIDSequence> result(new PackageIDSequence::Concrete);
+ tr1::shared_ptr<PackageIDSequence> result(new PackageIDSequence);
if (! do_has_package_named(n))
return result;
@@ -227,7 +229,7 @@ CRANRepository::do_install(const tr1::shared_ptr<const PackageID> & id_uncasted,
if (id->bundle_member_key())
return;
- tr1::shared_ptr<const FSEntryCollection> bashrc_files(_imp->params.environment->bashrc_files());
+ tr1::shared_ptr<const FSEntrySequence> bashrc_files(_imp->params.environment->bashrc_files());
Command cmd(Command(LIBEXECDIR "/paludis/cran.bash fetch")
.with_setenv("CATEGORY", "cran")
@@ -319,12 +321,12 @@ CRANRepository::do_package_set(const SetName & s) const
return tr1::shared_ptr<SetSpecTree::ConstItem>();
}
-tr1::shared_ptr<const SetNameCollection>
+tr1::shared_ptr<const SetNameSet>
CRANRepository::sets_list() const
{
Context context("While generating the list of sets:");
- tr1::shared_ptr<SetNameCollection> result(new SetNameCollection::Concrete);
+ tr1::shared_ptr<SetNameSet> result(new SetNameSet);
result->insert(SetName("base"));
return result;
}
@@ -353,7 +355,7 @@ CRANRepository::do_sync() const
tr1::shared_ptr<Repository>
CRANRepository::make_cran_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m)
+ tr1::shared_ptr<const Map<std::string, std::string> > m)
{
Context context("When making CRAN repository from repo_file '" +
(m->end() == m->find("repo_file") ? std::string("?") : m->find("repo_file")->second) + "':");
diff --git a/paludis/repositories/cran/cran_repository.hh b/paludis/repositories/cran/cran_repository.hh
index 31a76c9..8cc497b 100644
--- a/paludis/repositories/cran/cran_repository.hh
+++ b/paludis/repositories/cran/cran_repository.hh
@@ -68,7 +68,7 @@ namespace paludis
virtual tr1::shared_ptr<SetSpecTree::ConstItem> do_package_set(const SetName &) const;
- virtual tr1::shared_ptr<const SetNameCollection> sets_list() const;
+ virtual tr1::shared_ptr<const SetNameSet> sets_list() const;
/* RepositorySyncableInterface */
@@ -76,11 +76,11 @@ namespace paludis
/* Repository */
- virtual tr1::shared_ptr<const QualifiedPackageNameCollection> do_package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartCollection> do_category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool do_has_package_named(const QualifiedPackageName &) const
@@ -104,7 +104,7 @@ namespace paludis
*/
static tr1::shared_ptr<Repository> make_cran_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m);
+ tr1::shared_ptr<const Map<std::string, std::string> > m);
/**
* Destructor.
diff --git a/paludis/repositories/cran/cran_repository_TEST.cc b/paludis/repositories/cran/cran_repository_TEST.cc
index 6c3fe92..6ba4862 100644
--- a/paludis/repositories/cran/cran_repository_TEST.cc
+++ b/paludis/repositories/cran/cran_repository_TEST.cc
@@ -23,8 +23,8 @@
#include <paludis/repositories/cran/cran_package_id.hh>
#include <paludis/repositories/cran/cran_repository.hh>
#include <paludis/environments/test/test_environment.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/system.hh>
+#include <paludis/util/map.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <libwrapiter/libwrapiter_output_iterator.hh>
#include <test/test_framework.hh>
@@ -53,8 +53,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
keys->insert("format", "cran");
keys->insert("library", "cran_repository_TEST_dir/library");
keys->insert("location", "cran_repository_TEST_dir/repo1");
@@ -79,8 +78,7 @@ namespace test_cases
void run()
{
TestEnvironment env;
- tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
- new AssociativeCollection<std::string, std::string>::Concrete);
+ tr1::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
keys->insert("format", "cran");
keys->insert("library", "cran_repository_TEST_dir/library");
keys->insert("location", "cran_repository_TEST_dir/repo2");
diff --git a/paludis/repositories/gems/gem_specification.cc b/paludis/repositories/gems/gem_specification.cc
index f96c05a..1c84f64 100644
--- a/paludis/repositories/gems/gem_specification.cc
+++ b/paludis/repositories/gems/gem_specification.cc
@@ -364,28 +364,28 @@ GemSpecification::virtual_for_key() const
return tr1::shared_ptr<const MetadataPackageIDKey>();
}
-const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameCollection> >
+const tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> >
GemSpecification::keywords_key() const
{
- return tr1::shared_ptr<const MetadataCollectionKey<KeywordNameCollection> >();
+ return tr1::shared_ptr<const MetadataSetKey<KeywordNameSet> >();
}
-const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagCollection> >
+const tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> >
GemSpecification::iuse_key() const
{
- return tr1::shared_ptr<const MetadataCollectionKey<IUseFlagCollection> >();
+ return tr1::shared_ptr<const MetadataSetKey<IUseFlagSet> >();
}
-const tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> >
+const tr1::shared_ptr<const MetadataSetKey<InheritedSet> >
GemSpecification::inherited_key() const
{
- return tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> >();
+ return tr1::shared_ptr<const MetadataSetKey<InheritedSet> >();
}
-const tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> >
+const tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >
GemSpecification::use_key() const
{
- return tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> >();
+ return tr1::shared_ptr<const MetadataSetKey<UseFlagNameSet> >();
}
const tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> >
diff --git a/paludis/repositories/gems/gem_specification.hh b/paludis/repositories/gems/gem_specification.hh
index 0813b6c..c1d0322 100644
--- a/paludis/repositories/gems/gem_specification.hh
+++ b/paludis/repositories/gems/gem_specification.hh
@@ -91,10 +91,10 @@ namespace paludis
virtual const tr1::shared_ptr<const EAPI> eapi() const;
virtual const tr1::shared_ptr<const MetadataPackageIDKey> virtual_for_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<KeywordNameCollection> > keywords_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<IUseFlagCollection> > iuse_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameCollection> > use_key() const;
- virtual const tr1::shared_ptr<const MetadataCollectionKey<InheritedCollection> > inherited_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 8afc22f..2ed677b 100644
--- a/paludis/repositories/gems/gem_specification_TEST.cc
+++ b/paludis/repositories/gems/gem_specification_TEST.cc
@@ -47,19 +47,19 @@ namespace
{
}
- void visit(const MetadataCollectionKey<KeywordNameCollection> &)
+ void visit(const MetadataSetKey<KeywordNameSet> &)
{
}
- void visit(const MetadataCollectionKey<UseFlagNameCollection> &)
+ void visit(const MetadataSetKey<UseFlagNameSet> &)
{
}
- void visit(const MetadataCollectionKey<IUseFlagCollection> &)
+ void visit(const MetadataSetKey<IUseFlagSet> &)
{
}
- void visit(const MetadataCollectionKey<InheritedCollection> &)
+ void visit(const MetadataSetKey<InheritedSet> &)
{
}
diff --git a/paludis/repositories/gems/gems_repository.cc b/paludis/repositories/gems/gems_repository.cc
index 5fbec27..a3f3f7b 100644
--- a/paludis/repositories/gems/gems_repository.cc
+++ b/paludis/repositories/gems/gems_repository.cc
@@ -25,9 +25,10 @@
#include <paludis/repository_info.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/system.hh>
+#include <paludis/util/set.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/eapi.hh>
#include <paludis/hashed_containers.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
@@ -43,8 +44,8 @@ namespace paludis
{
const gems::RepositoryParams params;
- mutable tr1::shared_ptr<const CategoryNamePartCollection> category_names;
- mutable MakeHashedMap<CategoryNamePart, tr1::shared_ptr<const QualifiedPackageNameCollection> >::Type package_names;
+ mutable tr1::shared_ptr<const CategoryNamePartSet> category_names;
+ mutable MakeHashedMap<CategoryNamePart, tr1::shared_ptr<const QualifiedPackageNameSet> >::Type package_names;
mutable MakeHashedMap<QualifiedPackageName, tr1::shared_ptr<PackageIDSequence> >::Type ids;
mutable bool has_category_names;
@@ -77,7 +78,8 @@ GemsRepository::GemsRepository(const gems::RepositoryParams & params) :
.config_interface(0)
.destination_interface(0)
.licenses_interface(0)
- .portage_interface(0)
+ .e_interface(0)
+ .qa_interface(0)
.pretend_interface(0)
.make_virtuals_interface(0)
.hook_interface(0),
@@ -122,25 +124,25 @@ GemsRepository::do_has_package_named(const QualifiedPackageName & q) const
return _imp->package_names.find(q.category)->second->end() != _imp->package_names.find(q.category)->second->find(q);
}
-tr1::shared_ptr<const CategoryNamePartCollection>
+tr1::shared_ptr<const CategoryNamePartSet>
GemsRepository::do_category_names() const
{
need_category_names();
return _imp->category_names;
}
-tr1::shared_ptr<const QualifiedPackageNameCollection>
+tr1::shared_ptr<const QualifiedPackageNameSet>
GemsRepository::do_package_names(const CategoryNamePart & c) const
{
if (! has_category_named(c))
- return make_shared_ptr(new QualifiedPackageNameCollection::Concrete);
+ return make_shared_ptr(new QualifiedPackageNameSet);
need_ids();
- MakeHashedMap<CategoryNamePart, tr1::shared_ptr<const QualifiedPackageNameCollection> >::Type::const_iterator i(
+ MakeHashedMap<CategoryNamePart, tr1::shared_ptr<const QualifiedPackageNameSet> >::Type::const_iterator i(
_imp->package_names.find(c));
if (i == _imp->package_names.end())
- return make_shared_ptr(new QualifiedPackageNameCollection::Concrete);
+ return make_shared_ptr(new QualifiedPackageNameSet);
return i->second;
}
@@ -148,14 +150,14 @@ tr1::shared_ptr<const PackageIDSequence>
GemsRepository::do_package_ids(const QualifiedPackageName & q) const
{
if (! has_package_named(q))
- return make_shared_ptr(new PackageIDSequence::Concrete);
+ return make_shared_ptr(new PackageIDSequence);
need_ids();
MakeHashedMap<QualifiedPackageName, tr1::shared_ptr<PackageIDSequence> >::Type::const_iterator i(
_imp->ids.find(q));
if (i == _imp->ids.end())
- return make_shared_ptr(new PackageIDSequence::Concrete);
+ return make_shared_ptr(new PackageIDSequence);
return i->second;
}
@@ -166,7 +168,7 @@ GemsRepository::need_category_names() const
if (_imp->has_category_names)
return;
- tr1::shared_ptr<CategoryNamePartCollection::Concrete> cat(new CategoryNamePartCollection::Concrete);
+ tr1::shared_ptr<CategoryNamePartSet> cat(new CategoryNamePartSet);
_imp->category_names = cat;
cat->insert(CategoryNamePart("gems"));
@@ -181,7 +183,7 @@ GemsRepository::need_ids() const
need_category_names();
- tr1::shared_ptr<QualifiedPackageNameCollection::Concrete> pkgs(new QualifiedPackageNameCollection::Concrete);
+ tr1::shared_ptr<QualifiedPackageNameSet> pkgs(new QualifiedPackageNameSet);
_imp->package_names.insert(std::make_pair(CategoryNamePart("gems"), pkgs));
Context context("When loading gems yaml file:");
@@ -201,7 +203,7 @@ GemsRepository::need_ids() const
MakeHashedMap<QualifiedPackageName, tr1::shared_ptr<PackageIDSequence> >::Type::iterator v(_imp->ids.find(i->first.first));
if (_imp->ids.end() == v)
- v = _imp->ids.insert(std::make_pair(i->first.first, make_shared_ptr(new PackageIDSequence::Concrete))).first;
+ v = _imp->ids.insert(std::make_pair(i->first.first, make_shared_ptr(new PackageIDSequence))).first;
v->second->push_back(i->second);
}
diff --git a/paludis/repositories/gems/gems_repository.hh b/paludis/repositories/gems/gems_repository.hh
index da2dfce..fff0e17 100644
--- a/paludis/repositories/gems/gems_repository.hh
+++ b/paludis/repositories/gems/gems_repository.hh
@@ -54,11 +54,11 @@ namespace paludis
const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const QualifiedPackageNameCollection> do_package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartCollection> do_category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool do_has_package_named(const QualifiedPackageName &) const
diff --git a/paludis/repositories/gems/installed_gems_repository.cc b/paludis/repositories/gems/installed_gems_repository.cc
index 0571912..afc1ce6 100644
--- a/paludis/repositories/gems/installed_gems_repository.cc
+++ b/paludis/repositories/gems/installed_gems_repository.cc
@@ -26,8 +26,9 @@
#include <paludis/environment.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/collection_concrete.hh>
#include <paludis/util/dir_iterator.hh>
+#include <paludis/util/set.hh>
+#include <paludis/util/sequence.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/pstream.hh>
@@ -51,8 +52,8 @@ namespace paludis
{
const gems::InstalledRepositoryParams params;
- mutable tr1::shared_ptr<const CategoryNamePartCollection> category_names;
- mutable MakeHashedMap<CategoryNamePart, tr1::shared_ptr<const QualifiedPackageNameCollection> >::Type package_names;
+ mutable tr1::shared_ptr<const CategoryNamePartSet> category_names;
+ mutable MakeHashedMap<CategoryNamePart, tr1::shared_ptr<const QualifiedPackageNameSet> >::Type package_names;
mutable IDMap ids;
mutable bool has_category_names;
@@ -85,7 +86,8 @@ InstalledGemsRepository::InstalledGemsRepository(const gems::InstalledRepository
.config_interface(0)
.destination_interface(this)
.licenses_interface(0)
- .portage_interface(0)
+ .e_interface(0)
+ .qa_interface(0)
.make_virtuals_interface(0)
.pretend_interface(0)
.hook_interface(0),
@@ -127,25 +129,25 @@ InstalledGemsRepository::do_has_package_named(const QualifiedPackageName & q) co
return _imp->package_names.find(q.category)->second->end() != _imp->package_names.find(q.category)->second->find(q);
}
-tr1::shared_ptr<const CategoryNamePartCollection>
+tr1::shared_ptr<const CategoryNamePartSet>
InstalledGemsRepository::do_category_names() const
{
need_category_names();
return _imp->category_names;
}
-tr1::shared_ptr<const QualifiedPackageNameCollection>
+tr1::shared_ptr<const QualifiedPackageNameSet>
InstalledGemsRepository::do_package_names(const CategoryNamePart & c) const
{
if (! has_category_named(c))
- return make_shared_ptr(new QualifiedPackageNameCollection::Concrete);
+ return make_shared_ptr(new QualifiedPackageNameSet);
need_ids();
- MakeHashedMap<CategoryNamePart, tr1::shared_ptr<const QualifiedPackageNameCollection> >::Type::const_iterator i(
+ MakeHashedMap<CategoryNamePart, tr1::shared_ptr<const QualifiedPackageNameSet> >::Type::const_iterator i(
_imp->package_names.find(c));
if (i == _imp->package_names.end())
- return make_shared_ptr(new QualifiedPackageNameCollection::Concrete);
+ return make_shared_ptr(new QualifiedPackageNameSet);
return i->second;
}
@@ -153,13 +155,13 @@ tr1::shared_ptr<const PackageIDSequence>
InstalledGemsRepository::do_package_ids(const QualifiedPackageName & q) const
{
if (! has_package_named(q))
- return make_shared_ptr(new PackageIDSequence::Concrete);
+ return make_shared_ptr(new PackageIDSequence);
need_ids();
IDMap::const_iterator i(_imp->ids.find(q));
if (i == _imp->ids.end())
- return make_shared_ptr(new PackageIDSequence::Concrete);
+ return make_shared_ptr(new PackageIDSequence);
return i->second;
}
@@ -170,7 +172,7 @@ InstalledGemsRepository::need_category_names() const
if (_imp->has_category_names)
return;
- tr1::shared_ptr<CategoryNamePartCollection::Concrete> cat(new CategoryNamePartCollection::Concrete);
+ tr1::shared_ptr<CategoryNamePartSet> cat(new CategoryNamePartSet);
_imp->category_names = cat;
cat->insert(CategoryNamePart("gems"));
@@ -189,7 +191,7 @@ InstalledGemsRepository::need_ids() const
need_category_names();
- tr1::shared_ptr<QualifiedPackageNameCollection::Concrete> pkgs(new QualifiedPackageNameCollection::Concrete);
+ tr1::shared_ptr<QualifiedPackageNameSet> pkgs(new QualifiedPackageNameSet);
_imp->package_names.insert(std::make_pair(gems, pkgs));
for (DirIterator d(_imp->params.install_dir / "specifications"), d_end ; d != d_end ; ++d)
@@ -211,7 +213,7 @@ InstalledGemsRepository::need_ids() const
pkgs->insert(gems + p);
if (_imp->ids.end() == _imp->ids.find(gems + p))
- _imp->ids.insert(std::make_pair(gems + p, make_shared_ptr(new PackageIDSequence::Concrete)));
+ _imp->ids.insert(std::make_pair(gems + p, make_shared_ptr(new PackageIDSequence)));
_imp->ids.find(gems + p)->second->push_back(make_shared_ptr(new gems::GemSpecification(shared_from_this(), p, v, *d)));
}
}
diff --git a/paludis/repositories/gems/installed_gems_repository.hh b/paludis/repositories/gems/installed_gems_repository.hh
index c5d4831..7956d6d 100644
--- a/paludis/repositories/gems/installed_gems_repository.hh
+++ b/paludis/repositories/gems/installed_gems_repository.hh
@@ -62,11 +62,11 @@ namespace paludis
const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const QualifiedPackageNameCollection> do_package_names(
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual tr1::shared_ptr<const CategoryNamePartCollection> do_category_names() const
+ virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool do_has_package_named(const QualifiedPackageName &) const
diff --git a/paludis/repositories/gems/registration.cc b/paludis/repositories/gems/registration.cc
index 433397b..417343d 100644
--- a/paludis/repositories/gems/registration.cc
+++ b/paludis/repositories/gems/registration.cc
@@ -23,6 +23,7 @@
#include <paludis/repositories/gems/params.hh>
#include <paludis/repositories/gems/exceptions.hh>
#include <paludis/util/make_shared_ptr.hh>
+#include <paludis/util/map.hh>
#include <paludis/distribution.hh>
#include <paludis/environment.hh>
#include <libwrapiter/libwrapiter_forward_iterator.hh>
@@ -35,7 +36,7 @@ namespace
tr1::shared_ptr<Repository>
make_gems_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m)
+ tr1::shared_ptr<const Map<std::string, std::string> > m)
{
std::string location;
if (m->end() == m->find("location") || ((location = m->find("location")->second)).empty())
@@ -69,7 +70,7 @@ namespace
tr1::shared_ptr<Repository>
make_installed_gems_repository(
Environment * const env,
- tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m)
+ tr1::shared_ptr<const Map<std::string, std::string> > m)
{
std::string install_dir;
if (m->end() == m->find("install_dir") || ((install_dir = m->find("install_dir")->second)).empty())
diff --git a/paludis/repositories/gems/yaml.cc b/paludis/repositories/gems/yaml.cc
index d800575..b9fdc75 100644
--- a/paludis/repositories/gems/yaml.cc
+++ b/paludis/repositories/gems/yaml.cc
@@ -28,6 +28,7 @@
#include <syck.h>
#include <cstring>
#include <algorithm>
+#include <map>
using namespace paludis;
using namespace paludis::yaml;