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: First draft of the bootc plugin #555

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

dcantrell
Copy link

The only subcommand implemented right now is 'status'. Most options on rpm-ostree are available via the plugin. The notable exception --advisories since that conflicts with an existing dnf option.

Option groups also don't work, so all of the options are at the plugin level and I am noting the subcommand(s) they apply to in parentheses for the description on each option.

After that we just process the options to build an argument vector and in run() we run it and handle the exit code and log appropriately.

The only subcommand implemented right now is 'status'.  Most options
on rpm-ostree are available via the plugin.  The notable exception
--advisories since that conflicts with an existing dnf option.

Option groups also don't work, so all of the options are at the plugin
level and I am noting the subcommand(s) they apply to in parentheses
for the description on each option.

After that we just process the options to build an argument vector and
in run() we run it and handle the exit code and log appropriately.
@dcantrell
Copy link
Author

So with subprocess.Popen(), you can set text=True to get text output tied to the default system encoding for stdout and stderr. Set stderr to subprocess.STDOUT and set stdout to subprocess.PIPE and when you call communicate(), you do still get a tuple but stderr will be None because it's combined with stdout. The ordering should be as it would be if you ran the command directly.

@evan-goode
Copy link
Member

So with subprocess.Popen(), you can set text=True to get text output tied to the default system encoding for stdout and stderr. Set stderr to subprocess.STDOUT and set stdout to subprocess.PIPE and when you call communicate(), you do still get a tuple but stderr will be None because it's combined with stdout. The ordering should be as it would be if you ran the command directly.

OK, still not ideal but good enough for now.

@evan-goode evan-goode merged commit 78add1e into rpm-software-management:bootc Sep 25, 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