Bug #194398 - Do not log "exiting successfully" in emerge.log
authorZac Medico <zmedico@gentoo.org>
Fri, 5 Oct 2007 02:05:15 +0000 (02:05 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 5 Oct 2007 02:05:15 +0000 (02:05 -0000)
unless the status really is successful. Otherwise, log
"exiting unsuccessfully". Thanks to David Watzke. (trunk r7900)

svn path=/main/branches/2.1.2/; revision=7927

bin/emerge

index cba9ef5e5b836e1d3a9aaee30e2b25f4b70b2c18..4909a5f2502168603a79aeb3c7c6fabd3dfd1d63 100755 (executable)
@@ -4486,8 +4486,11 @@ def post_emerge(settings, 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.