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

o/snapstate: revert snaps with components #14510

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

andrewphelpsj
Copy link
Member

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.

@andrewphelpsj andrewphelpsj force-pushed the revert-comps branch 3 times, most recently from 6b9f536 to 8169c0b Compare September 16, 2024 18:43
@pedronis pedronis added this to the 2.66 milestone Sep 18, 2024
@andrewphelpsj andrewphelpsj force-pushed the revert-comps branch 3 times, most recently from 89ba893 to 94f13f6 Compare September 20, 2024 03:18
@andrewphelpsj andrewphelpsj marked this pull request as ready for review September 20, 2024 03:19
Copy link
Collaborator

@pedronis pedronis left a 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 {
Copy link
Collaborator

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?

Copy link
Member Author

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.

Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

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