aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-15 13:17:53 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-15 13:17:53 +0100
commit0f90fa7150e882fdf218419375c3c4a719831346 (patch)
treebbe7f674d1d83d013beb4f9c05f169585cdb70a8
parent503a820e92affef4ec1865679cdc904ac4f7db5c (diff)
downloadpaludis-0f90fa7150e882fdf218419375c3c4a719831346.tar.gz
paludis-0f90fa7150e882fdf218419375c3c4a719831346.tar.xz
Handle renaming to an existing package
-rw-r--r--paludis/repositories/e/vdb_repository.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 315f29e..221402a 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -1417,7 +1417,15 @@ VDBRepository::perform_updates()
FSEntry from_dir(m->first->fs_location_key()->value());
FSEntry to_dir(target_cat_dir / ((stringify(m->second.package()) + "-" + stringify(m->first->version()))));
- from_dir.rename(to_dir);
+ if (to_dir.exists())
+ {
+ /* Uh oh. It's possible to install both a package and its renamed version. */
+ Log::get_instance()->message("e.vdb.updates.collision", ll_warning, lc_context) <<
+ "I wanted to rename '" << from_dir << "' to '" << to_dir << "' for a package move, but the "
+ "latter already exists. Consult the Paludis FAQ for how to proceed.";
+ }
+ else
+ from_dir.rename(to_dir);
}
}
else