aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-28 10:07:18 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-28 10:07:18 +0000
commit7d482d4e6b69b9b5576618616ede5044487f8cd1 (patch)
tree647ab40792e7383249e05d5700178830a4655493
parent7f03646f03ede9a5aef199a9073366cf98925197 (diff)
downloadpaludis-7d482d4e6b69b9b5576618616ede5044487f8cd1.tar.gz
paludis-7d482d4e6b69b9b5576618616ede5044487f8cd1.tar.xz
Get provide versions right when we're using a non-default virtual provider
-rw-r--r--paludis/dep_list.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index 14abc1f..ff95841 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -357,11 +357,18 @@ DepList::visit(const PackageDepAtom * const p)
for (DepAtomFlattener::Iterator p(f.begin()), p_end(f.end()) ; p != p_end ; ++p)
{
- Save<bool> save_check(&_implementation->drop_all, true);
- Save<std::list<DepListEntry>::iterator> old_p(
- &_implementation->merge_list_insert_pos, next(merge_entry));
- _add_in_role_raw(*p, "PROVIDE");
- next(merge_entry)->set<dle_has_predeps>(true);
+ if (_implementation->merge_list.end() != std::find_if(
+ _implementation->merge_list.begin(), _implementation->merge_list.end(),
+ DepListEntryMatcher(
+ _implementation->environment->package_database().raw_pointer(), **p)))
+ continue;
+
+ VersionMetadata::Pointer p_metadata(new VersionMetadata);
+ p_metadata->set(vmk_slot, merge_entry->get<dle_metadata>()->get(vmk_slot));
+ p_metadata->set(vmk_virtual, stringify(merge_entry->get<dle_name>()));
+ _implementation->merge_list.insert(next(merge_entry),
+ DepListEntry((*p)->package(), merge_entry->get<dle_version>(),
+ p_metadata, merge_entry->get<dle_repository>(), true, true, true));
}
}