aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-30 22:22:54 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-30 22:22:54 +0000
commit904e31a92e816f47a6e2ba43375a837aa765c356 (patch)
tree088bdf2d19c0b557fd21d74e61a5b12c8260da49
parentbe6a82f5614b82b15c9a064608e38d79db01b65f (diff)
downloadpaludis-904e31a92e816f47a6e2ba43375a837aa765c356.tar.gz
paludis-904e31a92e816f47a6e2ba43375a837aa765c356.tar.xz
RepositoryName, and hence PackageDatabaseEntry, no longer define operator< . A new class, ArbitrarilyOrderedPackageDatabaseEntryCollection, is provided for where an arbitrary ordering is required.
-rw-r--r--paludis/dep_list/dep_list.cc4
-rw-r--r--paludis/dep_list/uninstall_list.cc73
-rw-r--r--paludis/dep_list/uninstall_list.hh11
-rw-r--r--paludis/dep_list/uninstall_list_TEST.cc4
-rw-r--r--paludis/files.m42
-rw-r--r--paludis/name.hh15
-rw-r--r--paludis/package_database.cc85
-rw-r--r--paludis/package_database.hh6
-rw-r--r--paludis/package_database_TEST.cc16
-rw-r--r--paludis/package_database_entry.cc58
-rw-r--r--paludis/package_database_entry.hh21
-rw-r--r--paludis/package_database_entry.sr2
-rw-r--r--paludis/tasks/install_task.cc4
-rw-r--r--paludis/tasks/report_task.cc5
-rw-r--r--paludis/tasks/uninstall_task.cc2
-rw-r--r--paludis/util/collection.hh7
-rw-r--r--paludis/util/collection_concrete.hh24
-rw-r--r--paludis/util/compare.hh2
-rw-r--r--paludis/util/validated.hh37
-rw-r--r--ruby/package_database_entry.cc3
-rw-r--r--ruby/paludis_ruby.hh8
-rw-r--r--src/clients/adjutrix/find_insecure_packages.cc6
-rw-r--r--src/clients/gtkpaludis/package_overview.cc5
-rw-r--r--src/clients/gtkpaludis/repositories_list.cc4
-rw-r--r--src/clients/paludis/applets.cc2
-rw-r--r--src/output/console_install_task.cc39
-rw-r--r--src/output/console_install_task.hh13
-rw-r--r--src/output/console_install_task.sr2
28 files changed, 354 insertions, 106 deletions
diff --git a/paludis/dep_list/dep_list.cc b/paludis/dep_list/dep_list.cc
index 758d2a4..eac9692 100644
--- a/paludis/dep_list/dep_list.cc
+++ b/paludis/dep_list/dep_list.cc
@@ -473,7 +473,9 @@ DepList::AddVisitor::visit(const PackageDepAtom * const a)
aa_end(already_installed->end()) ; aa != aa_end ; ++aa)
if (d->_imp->env->package_database()->fetch_repository(aa->repository)->
version_metadata(aa->name, aa->version)->slot == slot)
- already_installed_in_same_slot->insert(*aa);
+ already_installed_in_same_slot->push_back(*aa);
+ /* no need to sort already_installed_in_same_slot here, although if the above is
+ * changed then check that this still holds... */
/* we have an already installed version. do we want to use it? */
if (! already_installed_in_same_slot->empty())
diff --git a/paludis/dep_list/uninstall_list.cc b/paludis/dep_list/uninstall_list.cc
index 8654d72..119cc1f 100644
--- a/paludis/dep_list/uninstall_list.cc
+++ b/paludis/dep_list/uninstall_list.cc
@@ -61,7 +61,7 @@ namespace paludis
UninstallListOptions options;
std::list<UninstallListEntry> uninstall_list;
- mutable MakeHashedMap<PackageDatabaseEntry, PackageDatabaseEntryCollection::ConstPointer>::Type
+ mutable MakeHashedMap<PackageDatabaseEntry, ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer>::Type
dep_collector_cache;
Implementation(const Environment * const e, const UninstallListOptions & o) :
@@ -198,12 +198,12 @@ UninstallList::add_unused()
{
Context context("When finding unused packages:");
- PackageDatabaseEntryCollection::ConstPointer world(collect_world()),
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer world(collect_world()),
everything(collect_all_installed());
- PackageDatabaseEntryCollection::Pointer
- world_plus_deps(new PackageDatabaseEntryCollection::Concrete),
- unused(new PackageDatabaseEntryCollection::Concrete);
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::Pointer
+ world_plus_deps(new ArbitrarilyOrderedPackageDatabaseEntryCollection::Concrete),
+ unused(new ArbitrarilyOrderedPackageDatabaseEntryCollection::Concrete);
world_plus_deps->insert(world->begin(), world->end());
@@ -211,13 +211,13 @@ UninstallList::add_unused()
while (old_size != world_plus_deps->size())
{
old_size = world_plus_deps->size();
- PackageDatabaseEntryCollection::ConstPointer new_world_deps(
- collect_depped_upon(world_plus_deps));
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer new_world_deps(collect_depped_upon(world_plus_deps));
world_plus_deps->insert(new_world_deps->begin(), new_world_deps->end());
}
std::set_difference(everything->begin(), everything->end(),
- world_plus_deps->begin(), world_plus_deps->end(), unused->inserter());
+ world_plus_deps->begin(), world_plus_deps->end(), unused->inserter(),
+ ArbitrarilyOrderedPackageDatabaseEntryCollectionComparator());
for (PackageDatabaseEntryCollection::Iterator i(unused->begin()),
i_end(unused->end()) ; i != i_end ; ++i)
@@ -269,12 +269,13 @@ UninstallList::move_package_to_end(const PackageDatabaseEntry & e)
_imp->uninstall_list.splice(_imp->uninstall_list.end(), _imp->uninstall_list, i);
}
-PackageDatabaseEntryCollection::ConstPointer
+ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer
UninstallList::collect_all_installed() const
{
Context context("When collecting all installed packages:");
- PackageDatabaseEntryCollection::Pointer result(new PackageDatabaseEntryCollection::Concrete);
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::Pointer result(
+ new ArbitrarilyOrderedPackageDatabaseEntryCollection::Concrete);
for (PackageDatabase::RepositoryIterator i(_imp->env->package_database()->begin_repositories()),
i_end(_imp->env->package_database()->end_repositories()) ; i != i_end ; ++i)
{
@@ -307,12 +308,12 @@ namespace
{
const Environment * const env;
const PackageDatabaseEntry pkg;
- PackageDatabaseEntryCollection::Pointer matches;
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::Pointer matches;
DepCollector(const Environment * const ee, const PackageDatabaseEntry & e) :
env(ee),
pkg(e),
- matches(new PackageDatabaseEntryCollection::Concrete)
+ matches(new ArbitrarilyOrderedPackageDatabaseEntryCollection::Concrete)
{
}
@@ -350,19 +351,20 @@ namespace
};
}
-PackageDatabaseEntryCollection::ConstPointer
-UninstallList::collect_depped_upon(PackageDatabaseEntryCollection::ConstPointer targets) const
+ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer
+UninstallList::collect_depped_upon(ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer targets) const
{
Context context("When collecting depended upon packages:");
- PackageDatabaseEntryCollection::Pointer result(new PackageDatabaseEntryCollection::Concrete);
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::Pointer result(
+ new ArbitrarilyOrderedPackageDatabaseEntryCollection::Concrete);
for (PackageDatabaseEntryCollection::Iterator i(targets->begin()), i_end(targets->end()) ;
i != i_end ; ++i)
{
Context local_context("When collecting depended upon packages for '" + stringify(*i) + "':");
- MakeHashedMap<PackageDatabaseEntry, PackageDatabaseEntryCollection::ConstPointer>::Type::const_iterator
+ MakeHashedMap<PackageDatabaseEntry, ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer>::Type::const_iterator
cache(_imp->dep_collector_cache.find(*i));
if (cache == _imp->dep_collector_cache.end())
{
@@ -373,7 +375,7 @@ UninstallList::collect_depped_upon(PackageDatabaseEntryCollection::ConstPointer
metadata->deps.run_depend()->accept(&c);
metadata->deps.post_depend()->accept(&c);
cache = _imp->dep_collector_cache.insert(std::make_pair(*i,
- PackageDatabaseEntryCollection::ConstPointer(c.matches))).first;
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer(c.matches))).first;
}
result->insert(cache->second->begin(), cache->second->end());
@@ -388,40 +390,42 @@ UninstallList::add_unused_dependencies()
Context context("When adding unused dependencies:");
bool added(true);
- PackageDatabaseEntryCollection::ConstPointer everything(collect_all_installed());
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer everything(collect_all_installed());
while (added)
{
added = false;
/* find packages that're depped upon by anything in our uninstall list */
- PackageDatabaseEntryCollection::Pointer uninstall_list_targets(
- new PackageDatabaseEntryCollection::Concrete);
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::Pointer uninstall_list_targets(
+ new ArbitrarilyOrderedPackageDatabaseEntryCollection::Concrete);
for (std::list<UninstallListEntry>::const_iterator i(_imp->uninstall_list.begin()),
i_end(_imp->uninstall_list.end()) ; i != i_end ; ++i)
uninstall_list_targets->insert(i->package);
- PackageDatabaseEntryCollection::ConstPointer depped_upon_list(
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer depped_upon_list(
collect_depped_upon(uninstall_list_targets));
/* find packages that're depped upon by anything not in our uninstall list */
- PackageDatabaseEntryCollection::Pointer everything_except_uninstall_list_targets(
- new PackageDatabaseEntryCollection::Concrete);
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::Pointer everything_except_uninstall_list_targets(
+ new ArbitrarilyOrderedPackageDatabaseEntryCollection::Concrete);
std::set_difference(everything->begin(), everything->end(),
uninstall_list_targets->begin(), uninstall_list_targets->end(),
- everything_except_uninstall_list_targets->inserter());
+ everything_except_uninstall_list_targets->inserter(),
+ ArbitrarilyOrderedPackageDatabaseEntryCollectionComparator());
Log::get_instance()->message(ll_debug, lc_context, "everything_except_uninstall_list_targets is '"
+ join(everything_except_uninstall_list_targets->begin(),
everything_except_uninstall_list_targets->end(), " ") + "'");
- PackageDatabaseEntryCollection::ConstPointer depped_upon_not_list(
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer depped_upon_not_list(
collect_depped_upon(everything_except_uninstall_list_targets));
/* find unused dependencies */
- PackageDatabaseEntryCollection::Pointer unused_dependencies(
- new PackageDatabaseEntryCollection::Concrete);
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::Pointer unused_dependencies(
+ new ArbitrarilyOrderedPackageDatabaseEntryCollection::Concrete);
std::set_difference(depped_upon_list->begin(), depped_upon_list->end(),
- depped_upon_not_list->begin(), depped_upon_not_list->end(), unused_dependencies->inserter());
+ depped_upon_not_list->begin(), depped_upon_not_list->end(), unused_dependencies->inserter(),
+ ArbitrarilyOrderedPackageDatabaseEntryCollectionComparator());
/* if any of them aren't already on the list, and aren't in world, add them and recurse */
IsWorld w(_imp->env);
@@ -446,13 +450,13 @@ UninstallList::add_dependencies(const PackageDatabaseEntry & e)
{
Context context("When adding things that depend upon '" + stringify(e) + "':");
- PackageDatabaseEntryCollection::ConstPointer everything(collect_all_installed());
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer everything(collect_all_installed());
for (PackageDatabaseEntryCollection::Iterator i(everything->begin()),
i_end(everything->end()) ; i != i_end ; ++i)
{
Context local_context("When seeing whether '" + stringify(*i) + "' has a dep:");
- MakeHashedMap<PackageDatabaseEntry, PackageDatabaseEntryCollection::ConstPointer>::Type::const_iterator
+ MakeHashedMap<PackageDatabaseEntry, ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer>::Type::const_iterator
cache(_imp->dep_collector_cache.find(*i));
if (cache == _imp->dep_collector_cache.end())
{
@@ -463,7 +467,7 @@ UninstallList::add_dependencies(const PackageDatabaseEntry & e)
metadata->deps.run_depend()->accept(&c);
metadata->deps.post_depend()->accept(&c);
cache = _imp->dep_collector_cache.insert(std::make_pair(*i,
- PackageDatabaseEntryCollection::ConstPointer(c.matches))).first;
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer(c.matches))).first;
}
if (cache->second->end() == cache->second->find(e))
@@ -476,13 +480,14 @@ UninstallList::add_dependencies(const PackageDatabaseEntry & e)
}
}
-PackageDatabaseEntryCollection::ConstPointer
+ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer
UninstallList::collect_world() const
{
Context local_context("When collecting world packages:");
- PackageDatabaseEntryCollection::Pointer result(new PackageDatabaseEntryCollection::Concrete);
- PackageDatabaseEntryCollection::ConstPointer everything(collect_all_installed());
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::Pointer result(
+ new ArbitrarilyOrderedPackageDatabaseEntryCollection::Concrete);
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer everything(collect_all_installed());
IsWorld w(_imp->env);
for (PackageDatabaseEntryCollection::Iterator i(everything->begin()),
diff --git a/paludis/dep_list/uninstall_list.hh b/paludis/dep_list/uninstall_list.hh
index a7eb2af..0bd14e1 100644
--- a/paludis/dep_list/uninstall_list.hh
+++ b/paludis/dep_list/uninstall_list.hh
@@ -43,10 +43,13 @@ namespace paludis
void move_package_to_end(const PackageDatabaseEntry &);
void add_unused_dependencies();
void add_dependencies(const PackageDatabaseEntry &);
- PackageDatabaseEntryCollection::ConstPointer collect_depped_upon(
- const PackageDatabaseEntryCollection::ConstPointer targets) const;
- PackageDatabaseEntryCollection::ConstPointer collect_all_installed() const;
- PackageDatabaseEntryCollection::ConstPointer collect_world() const;
+
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer collect_depped_upon(
+ const ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer targets) const;
+
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer collect_all_installed() const;
+
+ ArbitrarilyOrderedPackageDatabaseEntryCollection::ConstPointer collect_world() const;
public:
UninstallList(const Environment * const, const UninstallListOptions &);
diff --git a/paludis/dep_list/uninstall_list_TEST.cc b/paludis/dep_list/uninstall_list_TEST.cc
index 6fcd0d2..9b1ad31 100644
--- a/paludis/dep_list/uninstall_list_TEST.cc
+++ b/paludis/dep_list/uninstall_list_TEST.cc
@@ -87,7 +87,7 @@ namespace test_cases
void add_target(const std::string & p, const std::string & v)
{
- targets->insert(PackageDatabaseEntry(
+ targets->push_back(PackageDatabaseEntry(
QualifiedPackageName(p),
VersionSpec(v),
RepositoryName("installed")));
@@ -304,9 +304,9 @@ namespace test_cases
void populate_expected()
{
+ expected.push_back("foo/moo-3::installed");
expected.push_back("foo/bar-1::installed");
expected.push_back("foo/baz-2::installed");
- expected.push_back("foo/moo-3::installed");
expected.push_back("foo/oink-1::installed");
}
diff --git a/paludis/files.m4 b/paludis/files.m4
index 7d3d1dd..c3d4d93 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -24,7 +24,7 @@ add(`mask_reasons', `hh', `cc')
add(`match_package', `hh', `cc')
add(`name', `hh', `cc', `test', `sr')
add(`package_database', `hh', `cc', `test')
-add(`package_database_entry', `hh', `sr')
+add(`package_database_entry', `hh', `cc', `sr')
add(`paludis', `hh', `cc')
add(`portage_dep_lexer', `hh', `cc', `test')
add(`portage_dep_parser', `hh', `cc', `test')
diff --git a/paludis/name.hh b/paludis/name.hh
index 873d3c0..5462c61 100644
--- a/paludis/name.hh
+++ b/paludis/name.hh
@@ -299,7 +299,7 @@ namespace paludis
*
* \ingroup grpnames
*/
- typedef Validated<std::string, RepositoryNameValidator> RepositoryName;
+ typedef Validated<std::string, RepositoryNameValidator, comparison_mode::EqualityComparisonTag> RepositoryName;
/**
* Holds a collection of RepositoryName instances.
@@ -309,6 +309,19 @@ namespace paludis
typedef SequentialCollection<RepositoryName> RepositoryNameCollection;
/**
+ * Arbitrary useless comparator for RepositoryName.
+ *
+ * \ingroup grpnames
+ */
+ struct RepositoryNameComparator
+ {
+ bool operator() (const RepositoryName & lhs, const RepositoryName & rhs) const
+ {
+ return lhs.data() < rhs.data();
+ }
+ };
+
+ /**
* A KeywordNameValidator handles validation rules for the value of a
* KeywordName.
*
diff --git a/paludis/package_database.cc b/paludis/package_database.cc
index b28ee40..3b2bb42 100644
--- a/paludis/package_database.cc
+++ b/paludis/package_database.cc
@@ -205,7 +205,7 @@ PackageDatabase::fetch_unique_qualified_package_name(
PackageDatabaseEntryCollection::Pointer
PackageDatabase::_do_query(const PackageDepAtom & a, const InstallState installed_state) const
{
- PackageDatabaseEntryCollection::Pointer result(new PackageDatabaseEntryCollection::Concrete);
+ PackageDatabaseEntryCollection::Concrete::Pointer result(new PackageDatabaseEntryCollection::Concrete);
IndirectIterator<std::list<Repository::ConstPointer>::const_iterator, const Repository>
r(_imp->repositories.begin()),
@@ -226,10 +226,12 @@ PackageDatabase::_do_query(const PackageDepAtom & a, const InstallState installe
if (! match_package(_imp->environment, a, e))
continue;
- result->insert(e);
+ result->push_back(e);
}
}
+ _sort_package_database_entry_collection(*result);
+
return result;
}
@@ -252,6 +254,17 @@ PackageDatabase::fetch_repository(const RepositoryName & n) const
throw NoSuchRepositoryError(stringify(n));
}
+RepositoryName
+PackageDatabase::favourite_repository() const
+{
+ for (RepositoryIterator r(_imp->repositories.begin()), r_end(_imp->repositories.end()) ;
+ r != r_end ; ++r)
+ if ((*r)->can_be_favourite_repository())
+ return (*r)->name();
+
+ return RepositoryName("unnamed");
+}
+
const RepositoryName &
PackageDatabase::better_repository(const RepositoryName & r1,
const RepositoryName & r2) const
@@ -270,15 +283,69 @@ PackageDatabase::better_repository(const RepositoryName & r1,
throw InternalError(PALUDIS_HERE, "better_repository called on non-owned repositories");
}
-RepositoryName
-PackageDatabase::favourite_repository() const
+namespace
{
- for (RepositoryIterator r(_imp->repositories.begin()), r_end(_imp->repositories.end()) ;
- r != r_end ; ++r)
- if ((*r)->can_be_favourite_repository())
- return (*r)->name();
+ struct PDEComparator
+ {
+ const PackageDatabase * const pde;
+ std::map<std::string, int> rank;
- return RepositoryName("unnamed");
+ PDEComparator(const PackageDatabase * const p) :
+ pde(p)
+ {
+ int x(0);
+ for (PackageDatabase::RepositoryIterator r(pde->begin_repositories()), r_end(pde->end_repositories()) ;
+ r != r_end ; ++r)
+ rank.insert(std::make_pair(stringify((*r)->name()), ++x));
+ }
+
+ bool operator() (const PackageDatabaseEntry & lhs, const PackageDatabaseEntry & rhs) const
+ {
+ switch (compare(lhs.name, rhs.name))
+ {
+ case -1:
+ return true;
+
+ case 1:
+ return false;
+ }
+
+ switch (compare(lhs.version, rhs.version))
+ {
+ case -1:
+ return true;
+
+ case 1:
+ return false;
+ }
+
+ std::map<std::string, int>::const_iterator l(rank.find(stringify(lhs.repository)));
+ if (l == rank.end())
+ throw InternalError(PALUDIS_HERE, "lhs.repository '" + stringify(lhs.repository) + "' not in rank");
+
+ std::map<std::string, int>::const_iterator r(rank.find(stringify(rhs.repository)));
+ if (r == rank.end())
+ throw InternalError(PALUDIS_HERE, "rhs.repository '" + stringify(rhs.repository) + "' not in rank");
+
+ switch (compare(l->second, r->second))
+ {
+ case -1:
+ return true;
+
+ case 1:
+ return false;
+ }
+
+ return false;
+ }
+ };
+}
+
+void
+PackageDatabase::_sort_package_database_entry_collection(PackageDatabaseEntryCollection::Concrete & p) const
+{
+ if (! p.empty())
+ p.sort(PDEComparator(this));
}
PackageDatabaseEntryCollection::Pointer
diff --git a/paludis/package_database.hh b/paludis/package_database.hh
index 67f474f..7f68fac 100644
--- a/paludis/package_database.hh
+++ b/paludis/package_database.hh
@@ -223,6 +223,9 @@ namespace paludis
PackageDatabaseEntryCollection::Pointer _do_query(
const PackageDepAtom & a, const InstallState) const;
+ void _sort_package_database_entry_collection(
+ PackageDatabaseEntryCollection::Concrete &) const;
+
public:
/**
* Constructor.
@@ -252,6 +255,9 @@ namespace paludis
* Fetch the name of our 'favourite' repository (if a repository's
* name matches this when doing a graphical display, the repository
* name part may be omitted).
+ *
+ * Note that this is the repository with the <i>lowest</i> importance
+ * that is not a virtuals or installed_virtuals repository.
*/
RepositoryName favourite_repository() const;
diff --git a/paludis/package_database_TEST.cc b/paludis/package_database_TEST.cc
index 568b22c..142a9b8 100644
--- a/paludis/package_database_TEST.cc
+++ b/paludis/package_database_TEST.cc
@@ -119,35 +119,35 @@ namespace test_cases
PackageDepAtom d1("r1c1/r1c1p1");
const PackageDatabaseEntryCollection::Pointer q1(p.query(d1, is_any));
- TEST_CHECK_EQUAL(q1->size(), 1);
+ TEST_CHECK_EQUAL(std::distance(q1->begin(), q1->end()), 1);
PackageDepAtom d2("r1c1/r1c1p2");
const PackageDatabaseEntryCollection::Pointer q2(p.query(d2, is_any));
- TEST_CHECK_EQUAL(q2->size(), 2);
+ TEST_CHECK_EQUAL(std::distance(q2->begin(), q2->end()), 2);
PackageDepAtom d3(">=r1c1/r1c1p2-1");
const PackageDatabaseEntryCollection::Pointer q3(p.query(d3, is_any));
- TEST_CHECK_EQUAL(q3->size(), 2);
+ TEST_CHECK_EQUAL(std::distance(q3->begin(), q3->end()), 2);
PackageDepAtom d4(">=r1c1/r1c1p2-2");
const PackageDatabaseEntryCollection::Pointer q4(p.query(d4, is_any));
- TEST_CHECK_EQUAL(q4->size(), 1);
+ TEST_CHECK_EQUAL(std::distance(q4->begin(), q4->end()), 1);
PackageDepAtom d5(">=r1c1/r1c1p2-3");
const PackageDatabaseEntryCollection::Pointer q5(p.query(d5, is_any));
- TEST_CHECK_EQUAL(q5->size(), 0);
+ TEST_CHECK_EQUAL(std::distance(q5->begin(), q5->end()), 0);
PackageDepAtom d6("<r1c1/r1c1p2-3");
const PackageDatabaseEntryCollection::Pointer q6(p.query(d6, is_any));
- TEST_CHECK_EQUAL(q6->size(), 2);
+ TEST_CHECK_EQUAL(std::distance(q6->begin(), q6->end()), 2);
PackageDepAtom d7("rac1/rac1pa");
const PackageDatabaseEntryCollection::Pointer q7(p.query(d7, is_any));
- TEST_CHECK_EQUAL(q7->size(), 4);
+ TEST_CHECK_EQUAL(std::distance(q7->begin(), q7->end()), 4);
PackageDepAtom d8("foo/bar");
const PackageDatabaseEntryCollection::Pointer q8(p.query(d8, is_any));
- TEST_CHECK_EQUAL(q8->size(), 0);
+ TEST_CHECK_EQUAL(std::distance(q8->begin(), q8->end()), 0);
}
} package_database_query_test;
diff --git a/paludis/package_database_entry.cc b/paludis/package_database_entry.cc
new file mode 100644
index 0000000..12d2a46
--- /dev/null
+++ b/paludis/package_database_entry.cc
@@ -0,0 +1,58 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ *
+ * 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
+ */
+
+#include "package_database_entry.hh"
+#include <paludis/util/compare.hh>
+
+using namespace paludis;
+
+bool
+ArbitrarilyOrderedPackageDatabaseEntryCollectionComparator::operator () (
+ const PackageDatabaseEntry & lhs, const PackageDatabaseEntry & rhs) const
+{
+ switch (compare(lhs.name, rhs.name))
+ {
+ case -1:
+ return true;
+
+ case 1:
+ return false;
+ }
+
+ switch (compare(lhs.version, rhs.version))
+ {
+ case -1:
+ return true;
+
+ case 1:
+ return false;
+ }
+
+ switch (compare(lhs.repository.data(), rhs.repository.data()))
+ {
+ case -1:
+ return true;
+
+ case 1:
+ return false;
+ }
+
+ return false;
+}
+
diff --git a/paludis/package_database_entry.hh b/paludis/package_database_entry.hh
index 3658318..8efe7db 100644
--- a/paludis/package_database_entry.hh
+++ b/paludis/package_database_entry.hh
@@ -30,8 +30,27 @@ namespace paludis
/**
* A collection of PackageDatabaseEntry instances.
+ *
+ * Often this will have been ordered by
+ * PackageDatabase::sort_package_database_entry_collection . There is no intrinsic
+ * ordering because RepositoryName is not comparable except via a PackageDatabase .
*/
- typedef SortedCollection<PackageDatabaseEntry> PackageDatabaseEntryCollection;
+ typedef SequentialCollection<PackageDatabaseEntry> PackageDatabaseEntryCollection;
+
+ /**
+ * Comparator for ArbitrarilyOrderedPackageDatabaseEntryCollection.
+ */
+ struct ArbitrarilyOrderedPackageDatabaseEntryCollectionComparator
+ {
+ bool operator () (const PackageDatabaseEntry & lhs, const PackageDatabaseEntry & rhs) const;
+ };
+
+ /**
+ * A collection of PackageDatabaseEntry instances that are ordered, but not
+ * by best first.
+ */
+ typedef SortedCollection<PackageDatabaseEntry, ArbitrarilyOrderedPackageDatabaseEntryCollectionComparator>
+ ArbitrarilyOrderedPackageDatabaseEntryCollection;
/**
* A PackageDatabaseEntry can be written to a stream.
diff --git a/paludis/package_database_entry.sr b/paludis/package_database_entry.sr
index 7dd1bb0..f9ba658 100644
--- a/paludis/package_database_entry.sr
+++ b/paludis/package_database_entry.sr
@@ -18,6 +18,6 @@ make_class_PackageDatabaseEntry()
*/
END
- comparison_operators all all
+ comparison_operators equality all
}
diff --git a/paludis/tasks/install_task.cc b/paludis/tasks/install_task.cc
index 2b12931..c5ce92f 100644
--- a/paludis/tasks/install_task.cc
+++ b/paludis/tasks/install_task.cc
@@ -300,7 +300,9 @@ InstallTask::execute()
for (PackageDatabaseEntryCollection::Iterator c(collision_list->begin()),
c_end(collision_list->end()) ; c != c_end ; ++c)
if (dep->package.version != c->version)
- clean_list.insert(*c);
+ clean_list.push_back(*c);
+ /* no need to sort clean_list here, although if the above is
+ * changed then check that this still holds... */
on_build_cleanlist_post(*dep);
diff --git a/paludis/tasks/report_task.cc b/paludis/tasks/report_task.cc
index 62bac98..7162efe 100644
--- a/paludis/tasks/report_task.cc
+++ b/paludis/tasks/report_task.cc
@@ -31,7 +31,8 @@ namespace
public DepAtomVisitorTypes::ConstVisitor
{
private:
- std::multimap<PackageDatabaseEntry, DepTag::ConstPointer> _found;
+ std::multimap<PackageDatabaseEntry, DepTag::ConstPointer,
+ ArbitrarilyOrderedPackageDatabaseEntryCollectionComparator> _found;
const Environment & _env;
public:
@@ -167,7 +168,7 @@ ReportTask::execute()
UninstallList unused_list(e, UninstallListOptions());
unused_list.add_unused();
- std::set<PackageDatabaseEntry> unused;
+ std::set<PackageDatabaseEntry, ArbitrarilyOrderedPackageDatabaseEntryCollectionComparator> unused;
for (UninstallList::Iterator i(unused_list.begin()), i_end(unused_list.end());
i != i_end ; ++i)
if (! i->skip_uninstall)
diff --git a/paludis/tasks/uninstall_task.cc b/paludis/tasks/uninstall_task.cc
index a4687bb..9537c96 100644
--- a/paludis/tasks/uninstall_task.cc
+++ b/paludis/tasks/uninstall_task.cc
@@ -155,7 +155,7 @@ UninstallTask::execute()
*t, is_installed_only));
if (r->empty())
throw NoSuchPackageError(stringify(**t));
- else if (r->size() > 1)
+ else if (next(r->begin()) != r->end())
throw AmbiguousUnmergeTargetError(stringify(**t), r);
else
list.add(*r->begin());
diff --git a/paludis/util/collection.hh b/paludis/util/collection.hh
index 7be54e1..40368a0 100644
--- a/paludis/util/collection.hh
+++ b/paludis/util/collection.hh
@@ -91,6 +91,13 @@ namespace paludis
virtual Iterator last() const = 0;
+ struct ReverseTag;
+ typedef libwrapiter::ForwardIterator<ReverseTag, const T_> ReverseIterator;
+
+ virtual ReverseIterator rbegin() const = 0;
+
+ virtual ReverseIterator rend() const = 0;
+
///\}
///\name Finding items
diff --git a/paludis/util/collection_concrete.hh b/paludis/util/collection_concrete.hh
index 4679b5a..8ab332f 100644
--- a/paludis/util/collection_concrete.hh
+++ b/paludis/util/collection_concrete.hh
@@ -86,6 +86,16 @@ namespace paludis
return Iterator(std::find(_items.begin(), _items.end(), v));
}
+ virtual ReverseIterator rbegin() const
+ {
+ return ReverseIterator(_items.rbegin());
+ }
+
+ virtual ReverseIterator rend() const
+ {
+ return ReverseIterator(_items.rend());
+ }
+
virtual bool append(T_ v)
{
if (end() != find(v))
@@ -105,6 +115,20 @@ namespace paludis
{
return _items.empty();
}
+
+ ///\name Extra functions
+ ///\{
+
+ template <typename C_>
+ void sort(const C_ & t)
+ {
+ _items.sort(t);
+ }
+
+ //\}
+
+ typedef CountedPtr<Concrete, count_policy::InternalCountTag> ConstPointer;
+ typedef CountedPtr<Concrete, count_policy::InternalCountTag> Pointer;
};
/**
diff --git a/paludis/util/compare.hh b/paludis/util/compare.hh
index 87011fc..b695a84 100644
--- a/paludis/util/compare.hh
+++ b/paludis/util/compare.hh
@@ -124,6 +124,8 @@ namespace paludis
/**
* Compare t1 and t2.
*
+ * This is deliberately not specialised for the three parameter Validated.
+ *
* \retval -1 if t1 < t2, 1 if t1 > t2, 0 otherwise.
*
* \ingroup grpcompare
diff --git a/paludis/util/validated.hh b/paludis/util/validated.hh
index 0cb54b7..d324bb7 100644
--- a/paludis/util/validated.hh
+++ b/paludis/util/validated.hh
@@ -37,10 +37,11 @@ namespace paludis
*
* \ingroup grpvalidated
*/
- template <typename ValidatedDataType_, typename Validator_>
+ template <typename ValidatedDataType_, typename Validator_,
+ typename ComparisonMode_ = comparison_mode::FullComparisonTag>
class Validated : public ComparisonPolicy<
- Validated<ValidatedDataType_, Validator_>,
- comparison_mode::FullComparisonTag,
+ Validated<ValidatedDataType_, Validator_, ComparisonMode_>,
+ ComparisonMode_,
comparison_method::CompareByMemberTag<ValidatedDataType_> >
{
private:
@@ -53,7 +54,7 @@ namespace paludis
/**
* Copy constructor (no validation needed).
*/
- Validated(const Validated<ValidatedDataType_, Validator_> & other);
+ Validated(const Validated<ValidatedDataType_, Validator_, ComparisonMode_> & other);
/**
* Constructor (validation needed).
@@ -63,8 +64,8 @@ namespace paludis
/**
* Assignment (no validation needed).
*/
- const Validated<ValidatedDataType_, Validator_> & operator=
- (const Validated<ValidatedDataType_,Validator_> & other)
+ const Validated<ValidatedDataType_, Validator_, ComparisonMode_> & operator=
+ (const Validated<ValidatedDataType_, Validator_, ComparisonMode_> & other)
{
_value = other._value;
return *this;
@@ -83,25 +84,25 @@ namespace paludis
};
- template <typename ValidatedDataType_, typename Validator_>
- Validated<ValidatedDataType_, Validator_>::Validated(
- const Validated<ValidatedDataType_, Validator_> & other) :
+ template <typename ValidatedDataType_, typename Validator_, typename ComparisonMode_>
+ Validated<ValidatedDataType_, Validator_, ComparisonMode_>::Validated(
+ const Validated<ValidatedDataType_, Validator_, ComparisonMode_> & other) :
ComparisonPolicy<
- Validated<ValidatedDataType_, Validator_>,
- comparison_mode::FullComparisonTag,
+ Validated<ValidatedDataType_, Validator_, ComparisonMode_>,
+ ComparisonMode_,
comparison_method::CompareByMemberTag<ValidatedDataType_> >
(other),
_value(other._value)
{
}
- template <typename ValidatedDataType_, typename Validator_>
- Validated<ValidatedDataType_, Validator_>::Validated(const ValidatedDataType_ & value) :
+ template <typename ValidatedDataType_, typename Validator_, typename ComparisonMode_>
+ Validated<ValidatedDataType_, Validator_, ComparisonMode_>::Validated(const ValidatedDataType_ & value) :
ComparisonPolicy<
- Validated<ValidatedDataType_, Validator_>,
- comparison_mode::FullComparisonTag,
+ Validated<ValidatedDataType_, Validator_, ComparisonMode_>,
+ ComparisonMode_,
comparison_method::CompareByMemberTag<ValidatedDataType_> >
- (&Validated<ValidatedDataType_, Validator_>::_value),
+ (&Validated<ValidatedDataType_, Validator_, ComparisonMode_>::_value),
_value(value)
{
Validator_::validate(_value);
@@ -112,9 +113,9 @@ namespace paludis
*
* \ingroup grpvalidated
*/
- template <typename D_, typename V_>
+ template <typename D_, typename V_, typename C_>
std::ostream &
- operator<< (std::ostream & s, const Validated<D_, V_> & v)
+ operator<< (std::ostream & s, const Validated<D_, V_, C_> & v)
{
s << v.data();
return s;
diff --git a/ruby/package_database_entry.cc b/ruby/package_database_entry.cc
index 05cf57f..eee77c3 100644
--- a/ruby/package_database_entry.cc
+++ b/ruby/package_database_entry.cc
@@ -199,8 +199,7 @@ namespace
c_package_database_entry = rb_define_class_under(paludis_module(), "PackageDatabaseEntry", rb_cObject);
rb_define_singleton_method(c_package_database_entry, "new", RUBY_FUNC_CAST(&package_database_entry_new), 3);
rb_define_method(c_package_database_entry, "initialize", RUBY_FUNC_CAST(&package_database_entry_init), 3);
- rb_define_method(c_package_database_entry, "<=>", RUBY_FUNC_CAST(&Common<PackageDatabaseEntry>::compare), 1);
- rb_include_module(c_package_database_entry, rb_mComparable);
+ rb_define_method(c_package_database_entry, "==", RUBY_FUNC_CAST(&Common<PackageDatabaseEntry>::equal), 1);
rb_define_method(c_package_database_entry, "to_s", RUBY_FUNC_CAST(&Common<PackageDatabaseEntry>::to_s), 0);
rb_define_method(c_package_database_entry, "name", RUBY_FUNC_CAST(&package_database_entry_name), 0);
rb_define_method(c_package_database_entry, "name=", RUBY_FUNC_CAST(&package_database_entry_name_set), 1);
diff --git a/ruby/paludis_ruby.hh b/ruby/paludis_ruby.hh
index c398d30..d768c0d 100644
--- a/ruby/paludis_ruby.hh
+++ b/ruby/paludis_ruby.hh
@@ -157,6 +157,14 @@ namespace paludis
return INT2FIX(paludis::compare(*left_ptr, *right_ptr));
}
+ static VALUE equal(VALUE left, VALUE right)
+ {
+ T_ * left_ptr, * right_ptr;
+ Data_Get_Struct(left, T_, left_ptr);
+ Data_Get_Struct(right, T_, right_ptr);
+ return (*left_ptr == *right_ptr) ? Qtrue : Qfalse;
+ }
+
static VALUE to_s(VALUE self)
{
T_ * self_ptr;
diff --git a/src/clients/adjutrix/find_insecure_packages.cc b/src/clients/adjutrix/find_insecure_packages.cc
index 7067963..c68bb9e 100644
--- a/src/clients/adjutrix/find_insecure_packages.cc
+++ b/src/clients/adjutrix/find_insecure_packages.cc
@@ -64,7 +64,8 @@ namespace
{
private:
const Environment & _env;
- std::multimap<PackageDatabaseEntry, std::string> _found;
+ std::multimap<PackageDatabaseEntry, std::string,
+ ArbitrarilyOrderedPackageDatabaseEntryCollectionComparator> _found;
public:
ListInsecureVisitor(const Environment & e) :
@@ -113,7 +114,8 @@ namespace
std::ostream & operator<< (std::ostream & s, const ListInsecureVisitor & v)
{
QualifiedPackageName old_name("dormouse/teapot");
- for (std::multimap<PackageDatabaseEntry, std::string>::const_iterator
+ for (std::multimap<PackageDatabaseEntry, std::string,
+ ArbitrarilyOrderedPackageDatabaseEntryCollectionComparator>::const_iterator
f(v._found.begin()), f_end(v._found.end()) ; f != f_end ; ++f)
{
if (f->first.name != old_name)
diff --git a/src/clients/gtkpaludis/package_overview.cc b/src/clients/gtkpaludis/package_overview.cc
index 172810d..4d66b51 100644
--- a/src/clients/gtkpaludis/package_overview.cc
+++ b/src/clients/gtkpaludis/package_overview.cc
@@ -149,7 +149,7 @@ namespace
StatusBarMessage m1(this, "Querying package...");
Glib::RefPtr<Gtk::TreeStore> model(Gtk::TreeStore::create(_imp->columns));
- std::map<RepositoryName, Gtk::TreeModel::iterator> repository_rows;
+ std::map<RepositoryName, Gtk::TreeModel::iterator, RepositoryNameComparator> repository_rows;
Gtk::TreeModel::Row top_row = *model->append();
top_row[_imp->columns.col_left] = stringify(_pkg);
@@ -178,7 +178,8 @@ namespace
for (PackageDatabaseEntryCollection::Iterator i(entries->begin()), i_end(entries->end()) ;
i != i_end ; ++i)
{
- std::map<RepositoryName, Gtk::TreeModel::iterator>::iterator r(repository_rows.find(i->repository));
+ std::map<RepositoryName, Gtk::TreeModel::iterator, RepositoryNameComparator>::iterator
+ r(repository_rows.find(i->repository));
if (repository_rows.end() == r)
{
r = repository_rows.insert(std::make_pair(i->repository, model->append(versions_row.children()))).first;
diff --git a/src/clients/gtkpaludis/repositories_list.cc b/src/clients/gtkpaludis/repositories_list.cc
index f8a1c94..9735da2 100644
--- a/src/clients/gtkpaludis/repositories_list.cc
+++ b/src/clients/gtkpaludis/repositories_list.cc
@@ -59,7 +59,7 @@ namespace paludis
{
}
- void add_repositories(const std::set<RepositoryName> & c)
+ void add_repositories(const std::set<RepositoryName, RepositoryNameComparator> & c)
{
for (std::set<RepositoryName>::const_iterator n(c.begin()), n_end(c.end()) ; n != n_end ; ++n)
{
@@ -90,7 +90,7 @@ namespace
void
Populate::operator() ()
{
- std::set<RepositoryName> names;
+ std::set<RepositoryName, RepositoryNameComparator> names;
StatusBarMessage m1(this, "Loading repository names...");
diff --git a/src/clients/paludis/applets.cc b/src/clients/paludis/applets.cc
index d039e8e..ac003f9 100644
--- a/src/clients/paludis/applets.cc
+++ b/src/clients/paludis/applets.cc
@@ -82,7 +82,7 @@ int do_best_version()
"new style virtuals.");
PackageDatabaseEntryCollection::Pointer new_entries(
new PackageDatabaseEntryCollection::Concrete);
- new_entries->insert(metadata->get_virtual_interface()->virtual_for);
+ new_entries->push_back(metadata->get_virtual_interface()->virtual_for);
entries = new_entries;
}
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index 0262cc4..e7ac10d 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -37,11 +37,35 @@ using namespace paludis;
#include <src/output/console_install_task-sr.cc>
+bool
+UseDescriptionComparator::operator() (const UseDescription & lhs, const UseDescription & rhs) const
+{
+ if (lhs.flag < rhs.flag)
+ return true;
+ if (lhs.flag > rhs.flag)
+ return false;
+
+ if (lhs.package.name < rhs.package.name)
+ return true;
+ if (lhs.package.name > rhs.package.name)
+ return false;
+
+ if (lhs.package.version < rhs.package.version)
+ return true;
+ if (lhs.package.version < rhs.package.version)
+ return false;
+
+ if (lhs.package.repository.data() < rhs.package.repository.data())
+ return true;
+
+ return false;
+}
+
ConsoleInstallTask::ConsoleInstallTask(Environment * const env,
const DepListOptions & options) :
InstallTask(env, options),
_all_tags(new SortedCollection<DepTagEntry>::Concrete),
- _all_use_descriptions(new SortedCollection<UseDescription>::Concrete),
+ _all_use_descriptions(new SortedCollection<UseDescription, UseDescriptionComparator>::Concrete),
_all_expand_prefixes(new UseFlagNameCollection::Concrete)
{
std::fill_n(_counts, static_cast<int>(last_count), 0);
@@ -361,8 +385,9 @@ ConsoleInstallTask::display_merge_list_post_use_descriptions(const std::string &
bool started(false);
UseFlagName old_flag("OFTEN_NOT_BEEN_ON_BOATS");
- SortedCollection<UseDescription>::Pointer group(new SortedCollection<UseDescription>::Concrete);
- for (SortedCollection<UseDescription>::Iterator i(all_use_descriptions()->begin()),
+ SortedCollection<UseDescription, UseDescriptionComparator>::Pointer group(
+ new SortedCollection<UseDescription, UseDescriptionComparator>::Concrete);
+ for (SortedCollection<UseDescription, UseDescriptionComparator>::Iterator i(all_use_descriptions()->begin()),
i_end(all_use_descriptions()->end()) ; i != i_end ; ++i)
{
switch (i->state)
@@ -411,7 +436,7 @@ ConsoleInstallTask::display_merge_list_post_use_descriptions(const std::string &
if (! group->empty())
display_use_summary_flag(prefix, group->begin(), group->end());
old_flag = i->flag;
- group.assign(new SortedCollection<UseDescription>::Concrete);
+ group.assign(new SortedCollection<UseDescription, UseDescriptionComparator>::Concrete);
}
group->insert(*i);
@@ -435,8 +460,8 @@ ConsoleInstallTask::display_use_summary_start(const std::string & prefix)
void
ConsoleInstallTask::display_use_summary_flag(const std::string & prefix,
- SortedCollection<UseDescription>::Iterator i,
- SortedCollection<UseDescription>::Iterator i_end)
+ SortedCollection<UseDescription, UseDescriptionComparator>::Iterator i,
+ SortedCollection<UseDescription, UseDescriptionComparator>::Iterator i_end)
{
if (next(i) == i_end)
{
@@ -449,7 +474,7 @@ ConsoleInstallTask::display_use_summary_flag(const std::string & prefix,
else
{
bool all_same(true);
- for (SortedCollection<UseDescription>::Iterator j(next(i)) ; all_same && j != i_end ; ++j)
+ for (SortedCollection<UseDescription, UseDescriptionComparator>::Iterator j(next(i)) ; all_same && j != i_end ; ++j)
if (j->description != i->description)
all_same = false;
diff --git a/src/output/console_install_task.hh b/src/output/console_install_task.hh
index 6392cdd..90a7546 100644
--- a/src/output/console_install_task.hh
+++ b/src/output/console_install_task.hh
@@ -38,6 +38,11 @@ namespace paludis
#include <src/output/console_install_task-sr.hh>
+ struct UseDescriptionComparator
+ {
+ bool operator() (const UseDescription &, const UseDescription &) const;
+ };
+
class PALUDIS_VISIBLE DepTagSummaryDisplayer :
public DepTagVisitorTypes::ConstVisitor,
public InternalCounted<DepTagSummaryDisplayer>
@@ -99,7 +104,7 @@ namespace paludis
private:
int _counts[last_count];
SortedCollection<DepTagEntry>::Pointer _all_tags;
- SortedCollection<UseDescription>::Pointer _all_use_descriptions;
+ SortedCollection<UseDescription, UseDescriptionComparator>::Pointer _all_use_descriptions;
UseFlagNameCollection::Pointer _all_expand_prefixes;
void _add_descriptions(UseFlagNameCollection::ConstPointer,
@@ -212,8 +217,8 @@ namespace paludis
virtual void display_merge_list_post_use_descriptions(const std::string &);
virtual void display_use_summary_start(const std::string &);
virtual void display_use_summary_flag(const std::string &,
- SortedCollection<UseDescription>::Iterator,
- SortedCollection<UseDescription>::Iterator);
+ SortedCollection<UseDescription, UseDescriptionComparator>::Iterator,
+ SortedCollection<UseDescription, UseDescriptionComparator>::Iterator);
virtual void display_use_summary_end();
///\}
@@ -238,7 +243,7 @@ namespace paludis
return _all_tags;
}
- SortedCollection<UseDescription>::Pointer all_use_descriptions()
+ SortedCollection<UseDescription, UseDescriptionComparator>::Pointer all_use_descriptions()
{
return _all_use_descriptions;
}
diff --git a/src/output/console_install_task.sr b/src/output/console_install_task.sr
index 433aef2..53780c9 100644
--- a/src/output/console_install_task.sr
+++ b/src/output/console_install_task.sr
@@ -8,8 +8,6 @@ make_class_UseDescription()
key state UseDescriptionState
key description std::string
- comparison_operators all flag package
-
allow_named_args
}