-
Notifications
You must be signed in to change notification settings - Fork 573
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
o/snapstate: revert snaps with components #14510
base: master
Are you sure you want to change the base?
Conversation
6b9f536
to
8169c0b
Compare
89ba893
to
94f13f6
Compare
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.
thanks, question
@@ -424,6 +424,11 @@ func (m *SnapManager) doLinkComponent(t *state.Task, _ *tomb.Tomb) error { | |||
return err | |||
} | |||
|
|||
// during a revert, components should already be linked | |||
if snapsup.Revert { |
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.
any reason not to skip adding the tasks instead in the first place?
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.
Good question, I feel like I originally had a reason for taking this approach, but it doesn't seem relevant now. I've reworked this to not create the tasks.
94f13f6
to
48a4744
Compare
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.
thank you
This enables us to revert snaps with components, which results in just switching to the set of components that was installed when that revision of the snap was the current one.