display_merge: tweak background/logging logic v2.2.0_alpha29
authorZac Medico <zmedico@gentoo.org>
Sun, 27 Mar 2011 22:37:47 +0000 (15:37 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 27 Mar 2011 22:37:47 +0000 (15:37 -0700)
pym/portage/dbapi/vartree.py

index e9b183ec9bf18368233f5f879e9b6ac713b32fe1..08263d6d3bd03267f7f1cb058300319e8777acce 100644 (file)
@@ -1731,11 +1731,13 @@ class dblink(object):
                if self._scheduler is None:
                        writemsg_level(msg, level=level, noiselevel=noiselevel)
                else:
-                       log_path = self.settings.get("PORTAGE_LOG_FILE")
+                       log_path = None
+                       if self.settings.get("PORTAGE_BACKGROUND") != "subprocess":
+                               log_path = self.settings.get("PORTAGE_LOG_FILE")
                        background = self.settings.get("PORTAGE_BACKGROUND") == "1"
 
-                       if log_path is None:
-                               if not (background and level < logging.WARN):
+                       if background and log_path is None:
+                               if level >= logging.WARN:
                                        writemsg_level(msg, level=level, noiselevel=noiselevel)
                        else:
                                self._scheduler.output(msg,