diff options
author | Zac Medico <zmedico@gentoo.org> | 2015-05-03 14:15:01 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2015-05-03 23:15:43 -0700 |
commit | 601fc103087bcecf46d34d26aad5a939a1cb087c (patch) | |
tree | 008e1c9cc2b5e2d76c048f86f343c679fcb24b4b /pym/portage/dbapi/vartree.py | |
parent | emake: refresh comments/docs/style (diff) | |
download | portage-601fc103087bcecf46d34d26aad5a939a1cb087c.tar.gz portage-601fc103087bcecf46d34d26aad5a939a1cb087c.tar.bz2 portage-601fc103087bcecf46d34d26aad5a939a1cb087c.zip |
Scheduler: increase visiblity of postinst failures (bug 547778)
This makes postinst failures behave more like "real" failures in
terms of output and the final emerge return code. However, in other
respects, these packages will be treated as successful installations.
This means that they will not cause emerge to immediately exit, and
they will not trigger recalculation of dependencies when --keep-going
is enabled.
X-Gentoo-Bug: 547778
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=547778
Acked-by: Brian Dolbec <dolsen@gentoo.org>
Diffstat (limited to 'pym/portage/dbapi/vartree.py')
-rw-r--r-- | pym/portage/dbapi/vartree.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index fca84d1b1..a2fb325c3 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1577,6 +1577,7 @@ class dblink(object): self._hash_key = (self._eroot, self.mycpv) self._protect_obj = None self._pipe = pipe + self._postinst_failure = False # When necessary, this attribute is modified for # compliance with RESTRICT=preserve-libs. @@ -4376,6 +4377,7 @@ class dblink(object): if a != os.EX_OK: # It's stupid to bail out here, so keep going regardless of # phase return code. + self._postinst_failure = True self._elog("eerror", "postinst", [ _("FAILED postinst: %s") % (a,), ]) @@ -5042,6 +5044,10 @@ class dblink(object): self.vartree.dbapi._bump_mtime(self.mycpv) if not parallel_install: self.unlockdb() + + if retval == os.EX_OK and self._postinst_failure: + retval = portage.const.RETURNCODE_POSTINST_FAILURE + return retval def getstring(self,name): |