Bug #194398 - Do not log "exiting successfully" in emerge.log
authorZac Medico <zmedico@gentoo.org>
Mon, 1 Oct 2007 19:44:39 +0000 (19:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 1 Oct 2007 19:44:39 +0000 (19:44 -0000)
unless the status really is successful. Otherwise, log
"exiting unsuccessfully". Thanks to David Watzke.

svn path=/main/trunk/; revision=7900

pym/emerge/__init__.py

index e396e8ad0b5618cf6b9c15dc6aea04229c5a1a72..7c00cdf748552689db3c2387234607ed7462187a 100644 (file)
@@ -4491,8 +4491,11 @@ def post_emerge(trees, mtimedb, retval):
 
        os.chdir("/")
 
-       emergelog("notitles" not in settings.features,
-               " *** exiting successfully.")
+       if retval == os.EX_OK:
+               exit_msg = " *** exiting successfully."
+       else:
+               exit_msg = " *** exiting unsuccessfully with status '%s'." % retval
+       emergelog("notitles" not in settings.features, exit_msg)
 
        # Dump the mod_echo output now so that our other notifications are shown
        # last.