aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-02-04 21:25:39 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-02-04 21:25:39 +0000
commitd6be04f0a43f5cc9af6c68b799234775e9f11cb2 (patch)
tree18acf25580441026676cb6cd5aff2f2839df8aab
parent582d6e2e064dd3a2e181ce8ac26359aace867b00 (diff)
downloadpaludis-d6be04f0a43f5cc9af6c68b799234775e9f11cb2.tar.gz
paludis-d6be04f0a43f5cc9af6c68b799234775e9f11cb2.tar.xz
Use .with_associated_id for ebuild_count.
-rw-r--r--paludis/repositories/e/qa/ebuild_count.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/paludis/repositories/e/qa/ebuild_count.cc b/paludis/repositories/e/qa/ebuild_count.cc
index 0a9fe5b..407abc5 100644
--- a/paludis/repositories/e/qa/ebuild_count.cc
+++ b/paludis/repositories/e/qa/ebuild_count.cc
@@ -39,18 +39,17 @@ paludis::erepository::ebuild_count_check(
Log::get_instance()->message(ll_debug, lc_context) << "ebuild_count_check '"
<< dir << "', " << name << "'";
- PackageIDSequence::ConstIterator::difference_type count(
- std::distance(repo->package_ids(q)->begin(), repo->package_ids(q)->end()));
-
- if (count > 20)
- reporter.message(QAMessage(dir, qaml_minor, name, "Found " + stringify(count) +
- " ebuilds, which is too many to count on both hands and both feet"));
- else if (count > 15)
- reporter.message(QAMessage(dir, qaml_minor, name, "Found " + stringify(count) +
- " ebuilds, which is too many to count on both hands and one foot"));
- else if (count > 10)
- reporter.message(QAMessage(dir, qaml_minor, name, "Found " + stringify(count) +
- " ebuilds, which is too many to count on my fingers"));
+ tr1::shared_ptr<const PackageIDSequence> ids(repo->package_ids(q));
+ PackageIDSequence::ConstIterator::difference_type count(std::distance(ids->begin(), ids->end()));
+
+ if (count > 10)
+ {
+ QAMessage m(dir, qaml_minor, name, "Found " + stringify(count) + " ebuilds, which is too many to count on " + (count > 20 ? "both hands and both feet" : count > 15 ? "both hands and one foot" : "my fingers"));
+ for (PackageIDSequence::ConstIterator it(ids->begin()),
+ it_end(ids->end()); it_end != it; ++it)
+ m = m.with_associated_id(*it);
+ reporter.message(m);
+ }
return true;
}