Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 865841 - sys-apps/portage: --quiet-build is not so quiet if terminal is noninteractive
Summary: sys-apps/portage: --quiet-build is not so quiet if terminal is noninteractive
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-20 04:41 UTC by John Helmert III
Modified: 2022-12-31 21:11 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-08-20 04:41:30 UTC
I've been using OCI containers (primarily podman) as an easy way to generate binpkgs. I've found that even --quiet=y does not effectively quiet the output, with consist and unnecessary load avg updates exactly 4 times between "installing" and "emerging" and 1 time between "emerging" and "installing":

>>> Emerging binary (1 of 32) acct-group/docker-0-r1::gentoo
>>> Jobs: 0 of 32 complete, 1 running               Load avg: 1.51, 1.42, 0.82
>>> Installing (1 of 32) acct-group/docker-0-r1::gentoo
>>> Jobs: 0 of 32 complete, 1 running               Load avg: 1.51, 1.42, 0.82
>>> Jobs: 0 of 32 complete                          Load avg: 1.51, 1.42, 0.82
>>> Jobs: 1 of 32 complete                          Load avg: 1.39, 1.40, 0.81
>>> Jobs: 1 of 32 complete, 1 running               Load avg: 1.39, 1.40, 0.81
>>> Emerging (2 of 32) dev-lang/go-bootstrap-1.16.6::gentoo
>>> Jobs: 1 of 32 complete, 1 running               Load avg: 1.39, 1.40, 0.81
>>> Installing (2 of 32) dev-lang/go-bootstrap-1.16.6::gentoo
>>> Jobs: 1 of 32 complete, 1 running               Load avg: 1.29, 1.37, 0.84
>>> Jobs: 1 of 32 complete                          Load avg: 1.29, 1.37, 0.84
>>> Jobs: 2 of 32 complete                          Load avg: 1.24, 1.36, 0.84
>>> Jobs: 2 of 32 complete, 1 running               Load avg: 1.24, 1.36, 0.84
>>> Emerging (3 of 32) dev-lang/go-1.18.5::gentoo

And this pattern repeats for the entirety of the emerge run. A similar pattern can be seen in gentoo-binhost-autobuilds: https://archives.gentoo.org/gentoo-binhost-autobuilds/message/032aaa5e0d03949c316c62131d934862

The exact code responsible for the load average output is here: https://github.com/gentoo/portage/blob/master/lib/_emerge/JobStatusDisplay.py#L245

When the terminal is interactive, the terminal displays this on the same line over and over. Perhaps it would be better to omit the load average updates altogether when the terminal is noninteractive? Or maybe this should be the behavior of --quiet=y?