From: Zac Medico Date: Tue, 19 Dec 2006 23:30:14 +0000 (-0000) Subject: For bug #158558, make the unmerge phase do automatic cleanup for broken vardbapi... X-Git-Tag: v2.1.2~266 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ce14e835d0f25e91d8a01937445ea5eef59939d4;p=portage.git 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 --- 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)