aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-11-16 18:24:34 (GMT)
committerZac Medico <zmedico@gentoo.org>2011-11-16 18:24:34 (GMT)
commit5a75056fdf9d875359b85b13388a93bdc713b815 (patch)
treeee6ff6531cdd8526a8f3d381adb101c8dc1095df
parentchecksum.py: handle pycrypto breakage (diff)
downloadportage-5a75056fdf9d875359b85b13388a93bdc713b815.zip
portage-5a75056fdf9d875359b85b13388a93bdc713b815.tar.gz
portage-5a75056fdf9d875359b85b13388a93bdc713b815.tar.bz2
xterm title HOSTNAME support, bug #390699
-rw-r--r--pym/_emerge/JobStatusDisplay.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/_emerge/JobStatusDisplay.py b/pym/_emerge/JobStatusDisplay.py
index 1949232..877a0c9 100644
--- a/pym/_emerge/JobStatusDisplay.py
+++ b/pym/_emerge/JobStatusDisplay.py
@@ -289,4 +289,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)