Closed Bug 875684 Opened 11 years ago Closed 11 years ago

mach's footer status ends up being printed on every line (and filling up your whole terminal), when run in screen, tmux, or byobu

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla25

People

(Reporter: dholbert, Assigned: gps)

References

Details

(Whiteboard: [mach] workaround: export MACH_NO_TERMINAL_FOOTER=1)

Attachments

(1 file)

The new awesome mach status at the bottom of my terminal ends up being wonky if I run "./mach build" inside of the "screen", "tmux", or their wrapper "byobu".  (These are all text-based window managers, to e.g. simulate separate tabs within a single gnome-terminal window.)

In a screen / tmux / byobu session, ./mach build ends up spitting out output looking like this:
{
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 02/02 (security/build) 0:07.98 cd pki; /usr/bin/make private_export
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 02/02 (security/build) 0:08.01 cd libpkix; /usr/bin/make private_export
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 02/02 (security/build) 0:08.03 cd include; /usr/bin/make private_export
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 02/02 (security/build) 0:08.06 cd pkix; /usr/bin/make private_export
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 02/02 (security/build) 0:08.08 cd certsel; /usr/bin/make private_export
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 02/02 (security/build) 0:08.11 cd crlsel; /usr/bin/make private_export
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 02/02 (security/build) 0:08.13 cd checker; /usr/bin/make private_export
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 02/02 (security/build) 0:08.16 cd params; /usr/bin/make private_export
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 02/02 (security/build) 0:08.19 cd results; /usr/bin/make private_export
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 02/02 (security/build) 0:08.21 cd store; /usr/bin/make private_export
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 02/02 (security/build) 0:08.24 cd top; /usr/bin/make private_export
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 02/02 (security/build) 0:08.27 cd util; /usr/bin/make private_export
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 02/02 (security/build) 0:08.29 There are no private exports.
}

This makes the build output really hard to follow.

When I'm just running in a terminal (no screen/tmux/byobu), then I only ever see one copy of the
> TIER: base nspr nss js platform app SUBTIER: export libs tools DIRECTORIES: 01/01
at a time, at the very bottom of the window, and it looks great.

I'm using Ubuntu 13.10.
sorry, I meant Ubuntu 13.04.
Summary: mach's footer-line ends up on every line, when run in screen, tmux, or byobu → mach's footer status ends up being printed on every line (and filling up your whole terminal), when run in screen, tmux, or byobu
(side question: is it possible to disable this mach footer-text, for the moment, as a workaround for this? It hurts to no longer be able to usefully build in byobu.)
It looks like this footer was added/proposed in bug 873720 comment 7.  Adding dependency on that bug.
Depends on: 873720
Flags: needinfo?(gps)
$ export MACH_NO_TERMINAL_FOOTER=1
$ mach build
# No footer!

I'll look into this on the other side of my holiday.
Flags: needinfo?(gps)
Just adding a cc/me too - same symptoms w/ tmux on openbsd. export MACH_NO_TERMINAL_FOOTER works around it.
Whiteboard: workaround: export MACH_NO_TERMINAL_FOOTER=1
This is also happening to me on OSX's Terminal.
That's surprising, because gps developed this patch on OS X.
Yeah, nobody else has complained, so there must be something odd about my setup.  I'm on 10.6, and I use the little tabs in Terminal.  Maybe one of those is the culprit.
(In reply to Andrew McCreight [:mccr8] from comment #8)
> I'm on 10.6, and I use the little tabs in Terminal.  Maybe one of
> those is the culprit.

If you go on Preferences > Settings > Advanced, what does "Declare terminal as" say?
xterm-color
Can someone who *doesn't* have this problem (eg gps) tell us what "Declare terminal as" is set to for them?
With iTerm (my typical terminal):

TERM=xterm-256color
TERM_PROGRAM=iTerm.app

With Terminal (built-in app):

TERM=xterm-256color
TERM_PROGRAM=iTerm.app

Both work just fine!
Can this get properly fixed ? As of now, mach is unusable in its default settings (sane defaults for everyone!) when run from a terminal multiplexer. And from what i understand, it only works in a small amount of existing term configurations.
I have this problem as well. Running zsh in screen on Ubuntu 13.04, TERM=screen-bce.
I (finally) looked at this. I was able to reproduce the issues with
screen and tmux (which appears to use screen under the hood unless TERM
is lying) using iTerm on OS X.

I believe the attached patch fixes the issue. I know people aren't peers
on any relevant module, but I don't feel this patch warrants peer
review. Plus, I'm build module owner and I can delegate :) Please r+ if
this patch works for you.
Attachment #772305 - Flags: review?(landry)
Attachment #772305 - Flags: review?(dholbert)
Assignee: nobody → gps
Component: mach → Build Config
Whiteboard: workaround: export MACH_NO_TERMINAL_FOOTER=1 → [mach] workaround: export MACH_NO_TERMINAL_FOOTER=1
Comment on attachment 772305 [details] [diff] [review]
Change how mach's terminal footer is printed

Review of attachment 772305 [details] [diff] [review]:
-----------------------------------------------------------------

Does the right thing for me on OpenBSD/tmux, thanks!
Attachment #772305 - Flags: review?(landry) → review+
https://hg.mozilla.org/mozilla-central/rev/a0c7e9f6c6be
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Blocks: 891849
I finally got around to updating my tree, and this fixes the problem for me with Terminal on OSX.  Thanks!
Attachment #772305 - Flags: review?(dholbert)
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: