Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootc: Simplify I/O with rpm-ostree subprocess #558

Conversation

evan-goode
Copy link
Member

See commit messages.

Also merges changes from master branch.

For https://issues.redhat.com/browse/SWM-3432

I think it's cleanest now to just have rpm-ostree output directly to the
stdout and stderr of the parent DNF process (usually the terminal).
There are several problems with trying to capture it and output it
through the `logger` interface:

- Where do stderr messages from rpm-ostree go? Are they errors?
  Warnings? Critical? We don't know.
- rpm-ostree is EXTREMELY SLOW and users need to see its progress in
  realtime. It has progress animations that wouldn't display
  right if we tried to buffer an entire line of output and then print it
  all at once with logger.info().
- Colors are missing from rpm-ostree output when stdout is not isatty.
  We could emulate a terminal (probably bad) or have rpm-ostree add a
  --color=on flag to override.

Lots of other dnf-plugins-core plugins `print` messages directly
stdout, so bootc would not be an exception here.
This is necessary if we want to support rpm-ostree's `--pending-exit-77`
flag. Maybe a cleaner solution could be to bring over libdnf5's
`SilentCommandExitError(int exit_code)`.
@evan-goode evan-goode force-pushed the evan-goode/bootc-stdin-stdout branch from 627c162 to 85a8e1d Compare October 8, 2024 20:07
@evan-goode
Copy link
Member Author

Rebased and added a missing proc.wait().

@evan-goode evan-goode merged commit a8ba817 into rpm-software-management:bootc Oct 8, 2024
3 checks passed
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