Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21430 - emerge sets xterm title to 'xterm' even with FEATURES="notitles"
Summary: emerge sets xterm title to 'xterm' even with FEATURES="notitles"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
: 21512 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-05-21 11:55 UTC by Christian Birchinger (RETIRED)
Modified: 2003-07-16 02:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-notitles.patch (emerge-notitles.patch,396 bytes, patch)
2003-07-01 14:27 UTC, Matthew Kennedy (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Birchinger (RETIRED) gentoo-dev 2003-05-21 11:55:16 UTC
emerge sets xterm title to 'xterm' even with FEATURES="notitles"

It does not check the option on emerge exit only on the beginning.

Reproducible: Always
Steps to Reproduce:
1. set FEATURES to notitles
2. use emerge
3.

Actual Results:  
Terminal title is set to 'xterm' (the $TERM value)

Expected Results:  
Terminal title should not be touched

Can be fixed with in /usr/lib/portage/bin/emerge:
(line 202)

- xtermTitle(os.environ["TERM"])

+ if "notitles" not in portage.features:
+         xtermTitle(os.environ["TERM"])
Comment 1 Christian Birchinger (RETIRED) gentoo-dev 2003-05-25 10:39:48 UTC
I've seen that VIM is able to restore the original window title after exiting.
I din't see how that's possible but this way would be the perfect solution.
(Even i would use the windowtitle feature if it would restore the old title after exiting)
Comment 2 Martin Ehmsen (RETIRED) gentoo-dev 2003-05-27 10:12:50 UTC
No it will not be the perfect solution, since touching the xterm title makes a lot of errormessages when emerge sig run from cron.
One could argue that using emerge from cron, is a no-no, but when you are maintaining a lot of gentoo's with different setups, it is very practical to use cron and mail the results back...
Comment 3 Christian Birchinger (RETIRED) gentoo-dev 2003-05-27 10:24:13 UTC
When you set the notitles feature it should not touch the title in any case.
So if you use cronstuff ... you should use the notitles feature.

And when you want emerge to change your title it touches it anyway. It does not
change the situation when you set it to the previous value instead of xterm.
It sends xterm title change ansi codes anyway.
Comment 4 Martin Ehmsen (RETIRED) gentoo-dev 2003-05-27 10:36:45 UTC
I agree with both.

1. When FEATURES="notitles" is set, emerge should not touch the title (but it does, as noted).
2. When FEATURES="notitles" is _not_ set, emerge should touch the title and if possible change the value back to the original title when it finishes.

But then: Why is this bug still here? It could easily be fix as you note above.
After the bug has been fixed, another bugreport should be filed with the request that emerge restores the original title (this new feature has nothing to do with this bugreport).
Comment 5 Nicholas Jones (RETIRED) gentoo-dev 2003-05-29 03:48:21 UTC
Fixed for 48-r1
Comment 6 Nicholas Jones (RETIRED) gentoo-dev 2003-05-29 04:16:27 UTC
fixed
Comment 7 Christian Birchinger (RETIRED) gentoo-dev 2003-06-06 09:36:32 UTC
2.0.48-r1 does not fix it. The function xtermTitleReset() is executed without
the if "notitles" not in portage.features: check. and the result is that the
title is "xterm" after the emerge process even with FEATURES="notitles".
Comment 8 Matthew Kennedy (RETIRED) gentoo-dev 2003-07-01 14:27:51 UTC
Created attachment 14087 [details, diff]
emerge-notitles.patch
Comment 9 Matthew Kennedy (RETIRED) gentoo-dev 2003-07-01 14:29:45 UTC
Nick,

The above patch will fix the problem.  Basically you fixed it for emergelog(), but for emergeexit() you forgot the wrap the xtermTitleReset() call.

Matt
Comment 10 Matthew Kennedy (RETIRED) gentoo-dev 2003-07-01 14:30:54 UTC
i should mention that patch was against portage-2.0.48-r1
Comment 11 SpanKY gentoo-dev 2003-07-09 12:44:33 UTC
*** Bug 21512 has been marked as a duplicate of this bug. ***
Comment 12 Nicholas Jones (RETIRED) gentoo-dev 2003-07-16 02:25:27 UTC
Added for >=2.0.49_pre8