summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-19 23:30:14 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-19 23:30:14 +0000
commitce14e835d0f25e91d8a01937445ea5eef59939d4 (patch)
tree3d8019714a6e4e2a3d3ba097d9e87f2efccd9176
parent79aaf08dc0bdfa51d6dcd2a4c018a914266db8e2 (diff)
downloadportage-ce14e835d0f25e91d8a01937445ea5eef59939d4.tar.gz
portage-ce14e835d0f25e91d8a01937445ea5eef59939d4.tar.bz2
portage-ce14e835d0f25e91d8a01937445ea5eef59939d4.zip
For bug #158558, make the unmerge phase do automatic cleanup for broken vardbapi.move_ent() in portage versions before 2.1.2.
svn path=/main/trunk/; revision=5328
-rw-r--r--pym/portage.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index fb8690bac..d0f2bbe5f 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6347,7 +6347,12 @@ class dblink:
mystuff = listdir(self.dbdir, EmptyOnError=1)
for x in mystuff:
if x.endswith(".ebuild"):
- myebuildpath = os.path.join(self.dbdir, x)
+ myebuildpath = os.path.join(self.dbdir, self.pkg + ".ebuild")
+ if x[:-7] != self.pkg:
+ # Clean up after vardbapi.move_ent() breakage in
+ # portage versions before 2.1.2
+ os.rename(os.path.join(self.dbdir, x), myebuildpath)
+ write_atomic(os.path.join(self.dbdir, "PF"), self.pkg+"\n")
break
self.settings.load_infodir(self.dbdir)