show feedback that getuto is running when invoked by portage#21
Merged
eli-schwartz merged 2 commits intoprojg2:mainfrom Jan 28, 2025
Merged
show feedback that getuto is running when invoked by portage#21eli-schwartz merged 2 commits intoprojg2:mainfrom
eli-schwartz merged 2 commits intoprojg2:mainfrom
Conversation
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.
thesamesam
approved these changes
Jan 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.