1 |
commit: 5a75056fdf9d875359b85b13388a93bdc713b815 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 16 18:24:34 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 16 18:24:34 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5a75056f |
7 |
|
8 |
xterm title HOSTNAME support, bug #390699 |
9 |
|
10 |
--- |
11 |
pym/_emerge/JobStatusDisplay.py | 9 ++++++++- |
12 |
1 files changed, 8 insertions(+), 1 deletions(-) |
13 |
|
14 |
diff --git a/pym/_emerge/JobStatusDisplay.py b/pym/_emerge/JobStatusDisplay.py |
15 |
index 1949232..877a0c9 100644 |
16 |
--- a/pym/_emerge/JobStatusDisplay.py |
17 |
+++ b/pym/_emerge/JobStatusDisplay.py |
18 |
@@ -289,4 +289,11 @@ class JobStatusDisplay(object): |
19 |
self._update(color_output.getvalue()) |
20 |
|
21 |
if self.xterm_titles: |
22 |
- xtermTitle(" ".join(plain_output.split())) |
23 |
+ # If the HOSTNAME variable is exported, include it |
24 |
+ # in the xterm title, just like emergelog() does. |
25 |
+ # See bug #390699. |
26 |
+ title_str = " ".join(plain_output.split()) |
27 |
+ hostname = os.environ.get("HOSTNAME") |
28 |
+ if hostname is not None: |
29 |
+ title_str = "%s: %s" % (hostname, title_str) |
30 |
+ xtermTitle(title_str) |