summaryrefslogtreecommitdiffstats
path: root/pym/portage.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-21 22:14:58 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-21 22:14:58 +0000
commit01db74cf9776abfb86918d633d77c1bad5040b27 (patch)
tree64e0fcdd9f497f9963679f868ab5baae65a8824a /pym/portage.py
parent4e8057eb9ec2d9df16b3a6d77ab8d3af43c13c67 (diff)
downloadportage-01db74cf9776abfb86918d633d77c1bad5040b27.tar.gz
portage-01db74cf9776abfb86918d633d77c1bad5040b27.tar.bz2
portage-01db74cf9776abfb86918d633d77c1bad5040b27.zip
For bug #163083, handle an UnsupportedAPIException thrown from the prerm phase.
svn path=/main/trunk/; revision=5749
Diffstat (limited to 'pym/portage.py')
-rw-r--r--pym/portage.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 6eaf919dd..8d30da9c4 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6884,8 +6884,15 @@ class dblink:
self.settings.load_infodir(self.dbdir)
if myebuildpath:
- doebuild_environment(myebuildpath, "prerm", self.myroot,
- self.settings, 0, 0, self.vartree.dbapi)
+ try:
+ doebuild_environment(myebuildpath, "prerm", self.myroot,
+ self.settings, 0, 0, self.vartree.dbapi)
+ except portage_exception.UnsupportedAPIException, e:
+ # Sometimes this happens due to corruption of the EAPI file.
+ writemsg("!!! FAILED prerm: %s\n" % \
+ os.path.join(self.dbdir, "EAPI"), noiselevel=-1)
+ writemsg("%s\n" % str(e), noiselevel=-1)
+ return 1
catdir = os.path.dirname(self.settings["PORTAGE_BUILDDIR"])
portage_util.ensure_dirs(os.path.dirname(catdir),
uid=portage_uid, gid=portage_gid, mode=070, mask=0)