Due to the --quiet-build=y default change, the hostname is no longer displayed/output during emerge. My suggestion would be to prepend it to self.xterm_titles in JobStatusDisplay.py Reproducible: Always Steps to Reproduce: 1. export HOSTNAME=$(hostname) 2. emerge foo -v --quiet-build=n (note xterm title) 3. emerge foo -qv (note xterm title) Actual Results: $hostname: emerge: (1 of N) cat/pkg $action Expected Results: Jobs: 0 of N complete, Load avg: N N N $hostname: Jobs: 0 of N complete, Load avg: N N N
Created attachment 292735 [details] 2 line patch that readds the hostname if it exists in the user
Comment on attachment 292735 [details] 2 line patch that readds the hostname if it exists in the user if $HOSTNAME exists in the users's environment, this 2 liner will display their hostname before "Jobs: "
how about asking python for the hostname of the system, instead of relying on a environment variable? sth like from socket import gethostname print gethostname()
(In reply to comment #3) > how about asking python for the hostname of the system, instead of relying on a > environment variable? > > sth like > > from socket import gethostname > print gethostname() KISS? not to mention, with my method, you can always overload the HOSTNAME variable to read whatever you want (which I've used to shorten hostnames on the fly).
ok, put differently: your approach doesn't work on my configuration. % echo $HOSTNAME HOSTNAME: Undefined variable. So your patch doesn't solve the problem. It seems you want to configure an arbitrary prefix of the xterm title, which maybe goes better via make.conf then.
(In reply to comment #5) > ok, put differently: your approach doesn't work on my configuration. > > % echo $HOSTNAME > HOSTNAME: Undefined variable. > > So your patch doesn't solve the problem. > > It seems you want to configure an arbitrary prefix of the xterm title, which > maybe goes better via make.conf then. 1, read the source, portage expects you to define the $HOSTNAME variable if you're going to get the prepend, if you'd like to explore pym/_emerge/emergelog.py, you'll find that it's you that's broken, not my "arbitrary" use of the variable $HOSTNAME. 2, define $HOSTNAME and it'll work for you, or unset if you prefer NOT having it show up... it's defined on all of my systems. If you're confused about this, please see my first entry on this bug.
No need to get rude. If you found my suggestion offending, then I apologise for that. It was meant informational only.
I think socked.gethostname() would be good if we wanted this to be unconditional, but controlling it with the HOSTNAME environment variable is nice, since that way the hostname is omitted for people who don't care about it. (In reply to comment #1) > Created attachment 292735 [details] > 2 line patch that readds the hostname if it exists in the user If I'm not mistaken, this patch affects the "Jobs: ... Load Avg.." display that's shown on stdout (not just the xterm title). Was that intended?
(In reply to comment #8) > I think socked.gethostname() would be good if we wanted this to be > unconditional, but controlling it with the HOSTNAME environment variable is > nice, since that way the hostname is omitted for people who don't care about > it. > > (In reply to comment #1) > > Created attachment 292735 [details] > > 2 line patch that readds the hostname if it exists in the user > > If I'm not mistaken, this patch affects the "Jobs: ... Load Avg.." display > that's shown on stdout (not just the xterm title). Was that intended? Yup, I noticed that behavior from it. Nonetheless, the patch isn't expected to be perfect, it's expected to work in a short amount of time and be simple. If you want to add a FEATURES keyword to manage its behavior and make it integrated the way emergelog's xtermTitle is, that's your choice as the main dev for the package. I made it work, you can make it elegant ;) Either way, without the steady migration towards --quiet-build=y, this behavioral oddity wouldn't have come to light: xterm titles are displayed no matter what if you don't have FEATURES=notitles. In the past you just had to live with build noise if you wanted the hostname displayed in the xterm title.
(In reply to comment #9) > Either way, without the steady migration towards --quiet-build=y, this > behavioral oddity wouldn't have come to light: xterm titles are displayed no > matter what if you don't have FEATURES=notitles. In the past you just had to > live with build noise if you wanted the hostname displayed in the xterm title. Oh, I understand why that is now. It's because JobStatusDisplay.display() returns early when self.quiet is True, which is how it behaves when all of the build output is being echoed to stdout.
(In reply to comment #9) > Yup, I noticed that behavior from it. Nonetheless, the patch isn't expected to > be perfect, it's expected to work in a short amount of time and be simple. If > you want to add a FEATURES keyword to manage its behavior and make it > integrated the way emergelog's xtermTitle is, that's your choice as the main > dev for the package. I made it work, you can make it elegant ;) How about if I just make it omit the hostname from the stdout display? That way, the only change will be to the xterm titles, which is the thing that prompted you to file the bug in the first place.
(In reply to comment #11) > How about if I just make it omit the hostname from the stdout display? That > way, the only change will be to the xterm titles, which is the thing that > prompted you to file the bug in the first place. Sounds a-ok to me. Thanks.
This is fixed in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5a75056fdf9d875359b85b13388a93bdc713b815
This is fixed in 2.1.10.35 and 2.2.0_alpha75.