aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-18 17:32:16 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-18 17:32:16 +0100
commit7f4f37f4294868ca73bfc208d64b890ff7937a03 (patch)
tree64a273b03a3af536cbb45e76feffb1aa49547282
parent57457926add52d81ca293ba17f7524bc6467e2b4 (diff)
downloadpaludis-7f4f37f4294868ca73bfc208d64b890ff7937a03.tar.gz
paludis-7f4f37f4294868ca73bfc208d64b890ff7937a03.tar.xz
Don't rely upon repo.package_ids sorting
-rw-r--r--src/clients/adjutrix/find_stable_candidates.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/clients/adjutrix/find_stable_candidates.cc b/src/clients/adjutrix/find_stable_candidates.cc
index 9571fde..338c65b 100644
--- a/src/clients/adjutrix/find_stable_candidates.cc
+++ b/src/clients/adjutrix/find_stable_candidates.cc
@@ -27,6 +27,8 @@
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/named_value.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
+#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/version_spec.hh>
#include <paludis/repository.hh>
#include <paludis/package_database.hh>
@@ -141,7 +143,9 @@ namespace
SlotsToVersions slots_to_versions;
std::tr1::shared_ptr<const PackageIDSequence> versions(repo.package_ids(package));
- for (PackageIDSequence::ConstIterator v(versions->begin()), v_end(versions->end()) ;
+ std::tr1::shared_ptr<PackageIDSet> versions_sorted(new PackageIDSet);
+ std::copy(versions->begin(), versions->end(), versions_sorted->inserter());
+ for (PackageIDSet::ConstIterator v(versions_sorted->begin()), v_end(versions_sorted->end()) ;
v != v_end ; ++v)
{
if (! (*v)->keywords_key())