From ce14e835d0f25e91d8a01937445ea5eef59939d4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 19 Dec 2006 23:30:14 +0000 Subject: [PATCH] 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 --- pym/portage.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) -- 2.26.2