Skip to content

Commit

Permalink
Fix altenative providers support using the snapd version with the fix
Browse files Browse the repository at this point in the history
we need to use the non-nop version of SanitizePlugsSlots as well for this to
work
  • Loading branch information
pedronis authored and upils committed Dec 5, 2023
1 parent aaa1769 commit 9997df4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require github.com/ulikunitz/xz v0.5.10 // indirect

require (
github.com/snapcore/secboot v0.0.0-20230623151406-4d331d24f830 // indirect
github.com/snapcore/snapd v0.0.0-20231013073308-d6406abbd09d
github.com/snapcore/snapd v0.0.0-20231116194835-79ec92d41431
github.com/xanzy/ssh-agent v0.3.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ github.com/snapcore/secboot v0.0.0-20230623151406-4d331d24f830/go.mod h1:72paVOk
github.com/snapcore/snapd v0.0.0-20201005140838-501d14ac146e/go.mod h1:3xrn7QDDKymcE5VO2rgWEQ5ZAUGb9htfwlXnoel6Io8=
github.com/snapcore/snapd v0.0.0-20231013073308-d6406abbd09d h1:S0Awi6wSKUXNV5cBllpnOdgqON3+MkDV0f0lnOtBxms=
github.com/snapcore/snapd v0.0.0-20231013073308-d6406abbd09d/go.mod h1:M+wSEB8eBfffw7I69nDtilqKfbdkmCNbtXY1wMJV1v0=
github.com/snapcore/snapd v0.0.0-20231116194835-79ec92d41431 h1:QalfTaOxPE/2hiaEl8z03MWbB6a56vN5Fx/uKkDmwuw=
github.com/snapcore/snapd v0.0.0-20231116194835-79ec92d41431/go.mod h1:M+wSEB8eBfffw7I69nDtilqKfbdkmCNbtXY1wMJV1v0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
Expand Down
5 changes: 3 additions & 2 deletions internal/statemachine/snap_states.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"path/filepath"

"github.com/snapcore/snapd/image"
"github.com/snapcore/snapd/interfaces/builtin"
"github.com/snapcore/snapd/seed/seedwriter"
"github.com/snapcore/snapd/snap"
)
Expand Down Expand Up @@ -59,8 +60,8 @@ func (stateMachine *StateMachine) prepareImage() error {
customizations.Validation = stateMachine.commonFlags.Validation
imageOpts.Customizations = customizations

// plug/slot sanitization not used by snap image.Prepare, make it no-op.
snap.SanitizePlugsSlots = func(snapInfo *snap.Info) {}
// plug/slot sanitization needed by provider handling
snap.SanitizePlugsSlots = builtin.SanitizePlugsSlots

// image.Prepare automatically has some output that we only want for
// verbose or greater logging
Expand Down

0 comments on commit 9997df4

Please sign in to comment.