Closed Bug 1490283 Opened 2 years ago Closed 1 year ago

Avoid libnotify suggestion on headless systems

Categories

(Firefox Build System :: General, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: ato, Assigned: ato)

Details

When you build Firefox on a headless system, such as on non-display
ssh terminal, you see this “helpful” advice when the build finishes:

>  6:04.46 Notification center failed: Install notify-send (usually part of the libnotify package) to get a notification when the build finishes.

There is apparently a MOZ_NOSPAM environmental variable you can
set, which is used only to control whether this warning is printed.

I wonder in practice how many desktop systems with a relative
standard installation does not come preinstalled with
notify-send/libnotify.  Is it worth printing the warning, or can
we reasonably assume that most systems in fact does have it?

The source code is here:
https://searchfox.org/mozilla-central/source/python/mozbuild/mozbuild/base.py#538-540

An alternative approach, instead of having to configure MOZ_NOSPAM,
might be to imply MOZ_NOSPAM when SSH_TTY is set.  This would avoid
the warning in headless ssh terminals.
I don’t know what you think is best?
Flags: needinfo?(gps)
Priority: -- → P4
I think it is a pretty harmless message to be printing. But making it conditional behind an `isatty()` check seems like a strict improvement. I believe there's an `is_interactive()` method or some such somewhere in the bowels of mach that could be used to gate the printing of this.
Flags: needinfo?(gps)
Assignee: nobody → ato
Status: NEW → ASSIGNED
Priority: P4 → P2
I was going to fix this, but now I can’t reproduce it anymore.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.