-
Notifications
You must be signed in to change notification settings - Fork 416
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: Add support for --transient
#2155
base: bootc
Are you sure you want to change the base?
bootc: Add support for --transient
#2155
Conversation
Hello @evan-goode! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2024-11-12 19:59:46 UTC |
Requires rpm-software-management/libdnf#1678. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we discussed transient mode is kind of the only workable option, does it need to be exposed as a CLI option? If we're trying to lay down groundwork for future dnf5 handling, that's fine too.
I do like modifying the main command this way, even though it bumps part out in anothter package. I had originally suggested a hybrid approach like that, but I think everyone was more comfortable with the plugin approach.
I would also walk this patch set and pull out common strings and replace them with macros or variable names. I do this with the thinking that down the road we will need additional or different name support for things like /usr or /bootc. Put all those strings in one place and macro name them then get rid of the multiple string duplications.
a636a2c
to
f0aa7d0
Compare
I changed the libdnf option to Currently, Thinking it over some more, I think we should make the user explicitly pass
I moved a couple strings to variables, although for these cases, if we were to change the strings, we'd probably want to change the variable names also. |
f0aa7d0
to
32583bc
Compare
32583bc
to
2d99f73
Compare
Adds support for the --transient option on all transactions. Passing --transient on a bootc system will call `bootc usr-overlay` to create a transient writeable /usr and continue the transaction. Specifying --transient on a non-bootc system will throw an error; we don't want to mislead users to thinking this feature works on non-bootc systems. If --transient is not specified and the bootc system is in a locked state, the operation will be aborted and a message will be printed suggesting to try again with --transient.
2d99f73
to
2eef46d
Compare
This is just a proof-of-concept. I am not sure whether we want to implement the bootc support this way or keep the original plan of keeping things contained to a DNF plugin. But this approach has the big advantage that we get all DNF operations (builddep, install, remove, upgrade, everything) working in "transient mode" for free without reimplementing any DNF commands within the bootc plugin.
Adds support for the
--transient
option on all transactions. Passing--transient
on a bootc system will callbootc usr-overlay
to create a transient writeable /usr and continue the transaction.Specifying
--transient
on a non-bootc system will throw an error; we don't want to mislead users to thinking this feature works on non-bootc systems.If
--transient
is not specified and the bootc system is in a locked state, the operation will be aborted and a message will be printed suggesting to try again with--transient
.