summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-03-01 13:20:59 -0800
committerZac Medico <zmedico@gentoo.org>2011-03-01 13:54:08 -0800
commit99e88f2d30761fa7c72660a97da1f516f1075256 (patch)
tree8a5b613d6b75eacc15a0b1c98438db5355b5ef0f
parent1ea61accd6003965c6a1e55285f7fed7b0587014 (diff)
downloadportage-99e88f2d30761fa7c72660a97da1f516f1075256.tar.gz
portage-99e88f2d30761fa7c72660a97da1f516f1075256.tar.bz2
portage-99e88f2d30761fa7c72660a97da1f516f1075256.zip
unmerge: log pre/postrm FAILED messages
-rw-r--r--pym/portage/dbapi/vartree.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index fdfbc7710..3bc30affd 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1518,6 +1518,7 @@ class dblink(object):
# Now, don't assume that the name of the ebuild is the same as the
# name of the dir; the package may have been moved.
myebuildpath = None
+ failures = 0
ebuild_phase = "prerm"
log_path = None
mystuff = os.listdir(self.dbdir)
@@ -1537,16 +1538,18 @@ class dblink(object):
doebuild_environment(myebuildpath, "prerm",
settings=self.settings, db=self.vartree.dbapi)
except UnsupportedAPIException as e:
+ failures += 1
# 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)
+ showMessage(_("!!! FAILED prerm: %s\n") % \
+ os.path.join(self.dbdir, "EAPI"),
+ level=logging.ERROR, noiselevel=-1)
+ showMessage("%s\n" % (e,),
+ level=logging.ERROR, noiselevel=-1)
myebuildpath = None
builddir_lock = None
scheduler = self._scheduler
retval = os.EX_OK
- failures = 0
try:
if myebuildpath:
builddir_lock = EbuildBuildDir(
@@ -1566,7 +1569,8 @@ class dblink(object):
# XXX: Decide how to handle failures here.
if retval != os.EX_OK:
failures += 1
- writemsg(_("!!! FAILED prerm: %s\n") % retval, noiselevel=-1)
+ showMessage(_("!!! FAILED prerm: %s\n") % retval,
+ level=logging.ERROR, noiselevel=-1)
self._unmerge_pkgfiles(pkgfiles, others_in_slot)
self._clear_contents_cache()
@@ -1591,7 +1595,8 @@ class dblink(object):
# XXX: Decide how to handle failures here.
if retval != os.EX_OK:
failures += 1
- writemsg(_("!!! FAILED postrm: %s\n") % retval, noiselevel=-1)
+ showMessage(_("!!! FAILED postrm: %s\n") % retval,
+ level=logging.ERROR, noiselevel=-1)
# Skip this if another package in the same slot has just been
# merged on top of this package, since the other package has