aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-22 15:28:39 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-22 15:28:39 +0000
commit39050ab76715bebb2a800a7d53bc4bad7795d027 (patch)
treefc7a7c3c84cb34cbd0a31fadb707118ce925a01e
parent977328d782f70c7b3bc4fb52903fa937d037d778 (diff)
downloadpaludis-39050ab76715bebb2a800a7d53bc4bad7795d027.tar.gz
paludis-39050ab76715bebb2a800a7d53bc4bad7795d027.tar.xz
Fix upgrades when new phase order
-rw-r--r--paludis/repositories/e/ebuild_entries.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index cc3bc28..1c78c54 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -524,6 +524,18 @@ EbuildEntries::pretend_fetch(const std::tr1::shared_ptr<const ERepositoryID> & i
}
}
+namespace
+{
+ bool slot_is_same(const std::tr1::shared_ptr<const PackageID> & a,
+ const std::tr1::shared_ptr<const PackageID> & b)
+ {
+ if (a->slot_key())
+ return b->slot_key() && a->slot_key()->value() == b->slot_key()->value();
+ else
+ return ! b->slot_key();
+ }
+}
+
void
EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
const InstallAction & install_action, const std::tr1::shared_ptr<const ERepositoryProfile> & p) const
@@ -788,6 +800,10 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
if ((*i)->name() == id->name() && (*i)->version() == id->version())
continue;
+ if (id->eapi()->supported()->ebuild_phases()->ebuild_new_upgrade_phase_order())
+ if ((*i)->name() == id->name() && slot_is_same(*i, id))
+ continue;
+
install_action.options.perform_uninstall()(*i);
}
}