Skip to content

Conversation

@eli-schwartz
Copy link
Contributor

No description provided.

In commit da77c23, getuto "made quiet
mode more quiet". It did this by piping the output of some gpg calls to
a grep pipe, that filtered out any "expected warnings" in the form of no
user IDs emitted by keys.openpgp.org, while mostly leaning on gpg
--quiet to be quiet.

In commit 15fcac9, getuto added -q to
grep, with the note "Also, use grep -q to honour --quiet". This meant
that grep was instructed to emit zero output if at all possible, and is
intended to use for scripts that want to check the return code of grep
to see whether matches were found. (getuto does NOT check this.)

Given this is incorrect use of grep, we instead just redirect all stdout
and stderr to /dev/null. It is semantically identical to what we already
do, but with one less fork+exec and the intent is far clearer.
quiet mode silences all output, as made more obvious by the previous
change. This isn't really appropriate for einfo status messages, though,
even if it is fine for gpg output itself. Redirect our einfos to a
temporary fd so we can capture them and preserve them.

Fixes portage being entirely silent about the fact that it is running
the trust helper, leading to people thinking portage itself is hanging
forever if getuto itself has issues.
@eli-schwartz eli-schwartz merged commit 66ad5be into projg2:main Jan 28, 2025
1 check passed
@eli-schwartz eli-schwartz deleted the quiet-status branch January 28, 2025 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants