Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/
Date: Tue, 01 Mar 2011 21:24:11
Message-Id: 6a505e814a0392463bd081b9c433e22001b8380e.zmedico@gentoo
1 commit: 6a505e814a0392463bd081b9c433e22001b8380e
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 1 21:20:59 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 1 21:20:59 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6a505e81
7
8 unmerge: log pre/postrm FAILED messages
9
10 ---
11 pym/portage/dbapi/vartree.py | 17 +++++++++++------
12 1 files changed, 11 insertions(+), 6 deletions(-)
13
14 diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
15 index af3b5d9..04e66ab 100644
16 --- a/pym/portage/dbapi/vartree.py
17 +++ b/pym/portage/dbapi/vartree.py
18 @@ -1519,6 +1519,7 @@ class dblink(object):
19 # Now, don't assume that the name of the ebuild is the same as the
20 # name of the dir; the package may have been moved.
21 myebuildpath = None
22 + failures = 0
23 ebuild_phase = "prerm"
24 log_path = None
25 mystuff = os.listdir(self.dbdir)
26 @@ -1538,16 +1539,18 @@ class dblink(object):
27 doebuild_environment(myebuildpath, "prerm",
28 settings=self.settings, db=self.vartree.dbapi)
29 except UnsupportedAPIException as e:
30 + failures += 1
31 # Sometimes this happens due to corruption of the EAPI file.
32 - writemsg(_("!!! FAILED prerm: %s\n") % \
33 - os.path.join(self.dbdir, "EAPI"), noiselevel=-1)
34 - writemsg("%s\n" % str(e), noiselevel=-1)
35 + showMessage(_("!!! FAILED prerm: %s\n") % \
36 + os.path.join(self.dbdir, "EAPI"),
37 + level=logging.ERROR, noiselevel=-1)
38 + showMessage("%s\n" % (e,),
39 + level=logging.ERROR, noiselevel=-1)
40 myebuildpath = None
41
42 builddir_lock = None
43 scheduler = self._scheduler
44 retval = os.EX_OK
45 - failures = 0
46 try:
47 if myebuildpath:
48 builddir_lock = EbuildBuildDir(
49 @@ -1567,7 +1570,8 @@ class dblink(object):
50 # XXX: Decide how to handle failures here.
51 if retval != os.EX_OK:
52 failures += 1
53 - writemsg(_("!!! FAILED prerm: %s\n") % retval, noiselevel=-1)
54 + showMessage(_("!!! FAILED prerm: %s\n") % retval,
55 + level=logging.ERROR, noiselevel=-1)
56
57 self._unmerge_pkgfiles(pkgfiles, others_in_slot)
58 self._clear_contents_cache()
59 @@ -1592,7 +1596,8 @@ class dblink(object):
60 # XXX: Decide how to handle failures here.
61 if retval != os.EX_OK:
62 failures += 1
63 - writemsg(_("!!! FAILED postrm: %s\n") % retval, noiselevel=-1)
64 + showMessage(_("!!! FAILED postrm: %s\n") % retval,
65 + level=logging.ERROR, noiselevel=-1)
66
67 # Skip this if another package in the same slot has just been
68 # merged on top of this package, since the other package has