aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'portage_with_autodep/pym/_emerge/JobStatusDisplay.py')
-rw-r--r--portage_with_autodep/pym/_emerge/JobStatusDisplay.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/portage_with_autodep/pym/_emerge/JobStatusDisplay.py b/portage_with_autodep/pym/_emerge/JobStatusDisplay.py
index 1949232..5b9b221 100644
--- a/portage_with_autodep/pym/_emerge/JobStatusDisplay.py
+++ b/portage_with_autodep/pym/_emerge/JobStatusDisplay.py
@@ -97,7 +97,7 @@ class JobStatusDisplay(object):
"""
Initialize term control codes.
@rtype: bool
- @returns: True if term codes were successfully initialized,
+ @return: True if term codes were successfully initialized,
False otherwise.
"""
@@ -209,24 +209,26 @@ class JobStatusDisplay(object):
def display(self):
"""
Display status on stdout, but only if something has
- changed since the last call.
+ changed since the last call. This always returns True,
+ for continuous scheduling via timeout_add.
"""
if self.quiet:
- return
+ return True
current_time = time.time()
time_delta = current_time - self._last_display_time
if self._displayed and \
not self._changed:
if not self._isatty:
- return
+ return True
if time_delta < self._min_display_latency:
- return
+ return True
self._last_display_time = current_time
self._changed = False
self._display_status()
+ return True
def _display_status(self):
# Don't use len(self._completed_tasks) here since that also
@@ -289,4 +291,11 @@ class JobStatusDisplay(object):
self._update(color_output.getvalue())
if self.xterm_titles:
- xtermTitle(" ".join(plain_output.split()))
+ # If the HOSTNAME variable is exported, include it
+ # in the xterm title, just like emergelog() does.
+ # See bug #390699.
+ title_str = " ".join(plain_output.split())
+ hostname = os.environ.get("HOSTNAME")
+ if hostname is not None:
+ title_str = "%s: %s" % (hostname, title_str)
+ xtermTitle(title_str)