1 |
commit: 99e88f2d30761fa7c72660a97da1f516f1075256 |
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:54:08 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=99e88f2d |
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 fdfbc77..3bc30af 100644 |
16 |
--- a/pym/portage/dbapi/vartree.py |
17 |
+++ b/pym/portage/dbapi/vartree.py |
18 |
@@ -1518,6 +1518,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 |
@@ -1537,16 +1538,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 |
@@ -1566,7 +1569,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 |
@@ -1591,7 +1595,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 |