aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-02 00:09:09 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-02 00:09:09 +0000
commit0fe0fade81ed1dfb810e0e31fd81cbd82a09370b (patch)
tree0b58de4ae8d3b813fb908dbf0999e83bc0d3609b
parentbf39958eefa6d95473062548da5d443dda937e6a (diff)
downloadpaludis-0fe0fade81ed1dfb810e0e31fd81cbd82a09370b.tar.gz
paludis-0fe0fade81ed1dfb810e0e31fd81cbd82a09370b.tar.xz
Don't include duplicates in A
-rw-r--r--paludis/portage_repository.cc18
1 files changed, 16 insertions, 2 deletions
diff --git a/paludis/portage_repository.cc b/paludis/portage_repository.cc
index b7b4096..89bdfae 100644
--- a/paludis/portage_repository.cc
+++ b/paludis/portage_repository.cc
@@ -929,6 +929,8 @@ PortageRepository::do_install(const QualifiedPackageName & q, const VersionSpec
std::string archives, flat_src_uri;
{
+ std::set<std::string> already_in_archives;
+
DepAtomFlattener f(_imp->env, &e,
DepParser::parse(metadata->get(vmk_src_uri),
DepParserPolicy<PlainTextDepAtom, false>::get_instance()));
@@ -937,9 +939,21 @@ PortageRepository::do_install(const QualifiedPackageName & q, const VersionSpec
{
std::string::size_type p((*ff)->text().rfind('/'));
if (std::string::npos == p)
- archives.append((*ff)->text());
+ {
+ if (already_in_archives.end() == already_in_archives.find((*ff)->text()))
+ {
+ archives.append((*ff)->text());
+ already_in_archives.insert((*ff)->text());
+ }
+ }
else
- archives.append((*ff)->text().substr(p + 1));
+ {
+ if (already_in_archives.end() == already_in_archives.find((*ff)->text().substr(p + 1)))
+ {
+ archives.append((*ff)->text().substr(p + 1));
+ already_in_archives.insert((*ff)->text().substr(p + 1));
+ }
+ }
archives.append(" ");
if (0 == (*ff)->text().compare(0, 9, "mirror://"))