aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-17 08:34:37 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-17 08:34:37 +0000
commitb37da39643d450b20f61fb564b5a028afada6785 (patch)
tree076c816fc84a46a45b489d54bcf2db9ff7f69e7b
parenta45a578cbb33eb6f73534900ab557e1923c7b1d2 (diff)
downloadpaludis-b37da39643d450b20f61fb564b5a028afada6785.tar.gz
paludis-b37da39643d450b20f61fb564b5a028afada6785.tar.xz
Warn on duplicate versions
-rw-r--r--paludis/repositories/gentoo/portage_repository.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/paludis/repositories/gentoo/portage_repository.cc b/paludis/repositories/gentoo/portage_repository.cc
index 4f7acd2..cecd762 100644
--- a/paludis/repositories/gentoo/portage_repository.cc
+++ b/paludis/repositories/gentoo/portage_repository.cc
@@ -579,11 +579,14 @@ PortageRepository::need_version_names(const QualifiedPackageName & n) const
try
{
- v->insert(VersionSpec(strip_leading_string(
- strip_trailing_string(e->basename(), _imp->entries_ptr->file_extension()),
- stringify(n.package) + "-")));
+ if (! v->insert(VersionSpec(strip_leading_string(
+ strip_trailing_string(e->basename(), _imp->entries_ptr->file_extension()),
+ stringify(n.package) + "-"))))
+ Log::get_instance()->message(ll_warning, lc_context, "Ignoring entry '" + stringify(*e)
+ + "' for '" + stringify(n) + "' in repository '" + stringify(name())
+ + "' because another equivalent version already exists");
}
- catch (const NameError & ee)
+ catch (const Exception & ee)
{
Log::get_instance()->message(ll_warning, lc_context, "Skipping entry '"
+ stringify(*e) + "' for '" + stringify(n) + "' in repository '"