aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-03-24 21:57:45 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-03-24 21:57:45 +0000
commitda5a575351c8636a694954c5efed2b6866dfeb1d (patch)
tree5e80953541d5f4e4299d192ee804a0fd72753af9
parent455d9f990c991a8858c2a3fff5b7568803f08af4 (diff)
downloadpaludis-da5a575351c8636a694954c5efed2b6866dfeb1d.tar.gz
paludis-da5a575351c8636a694954c5efed2b6866dfeb1d.tar.xz
Better error messages for VDB cruft. Fixes: ticket:143
-rw-r--r--paludis/repositories/gentoo/vdb_repository.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/paludis/repositories/gentoo/vdb_repository.cc b/paludis/repositories/gentoo/vdb_repository.cc
index c505942..da8a9b2 100644
--- a/paludis/repositories/gentoo/vdb_repository.cc
+++ b/paludis/repositories/gentoo/vdb_repository.cc
@@ -1652,7 +1652,15 @@ VDBRepository::merge(const MergeOptions & m)
}
if (is_replace)
+ {
+ if ((vdb_dir.dirname() / ("-reinstalling-" + vdb_dir.basename())).exists())
+ throw PackageInstallActionError("Directory '" + stringify(vdb_dir.dirname() /
+ ("-reinstalling-" + vdb_dir.basename())) + "' already exists, probably due to "
+ "a previous failed upgrade. If it is safe to do so, remove this directory and try "
+ "again.");
vdb_dir.rename(vdb_dir.dirname() / ("-reinstalling-" + vdb_dir.basename()));
+ }
+
tmp_vdb_dir.rename(vdb_dir);
merger.merge();