From 4c1f71bfdf0ee061392403e39873ea5f2c3acb3f Mon Sep 17 00:00:00 2001 From: Paul Mars Date: Tue, 5 Dec 2023 11:17:22 +0100 Subject: [PATCH] Also use the builtin SanitizePlugsSlots for classic builds --- internal/statemachine/classic_states.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/statemachine/classic_states.go b/internal/statemachine/classic_states.go index 63633635..71f164a5 100644 --- a/internal/statemachine/classic_states.go +++ b/internal/statemachine/classic_states.go @@ -15,6 +15,7 @@ import ( "github.com/snapcore/snapd/image" "github.com/snapcore/snapd/image/preseed" + "github.com/snapcore/snapd/interfaces/builtin" "github.com/snapcore/snapd/osutil" "github.com/snapcore/snapd/seed/seedwriter" "github.com/snapcore/snapd/snap" @@ -726,8 +727,8 @@ func (stateMachine *StateMachine) prepareClassicImage() error { imageOpts.Channel = stateMachine.commonFlags.Channel } - // 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 // check if the rootfs is already preseeded. This can happen when building from a // rootfs tarball