> You mean reset the preseeding anyway? Or skip the preseeding entirely? I am also not sure to understand why your problem is linked to resetting the preseeding.
I think the root cause is var/lib/snapd/state.json is not handled properly. By deafult, there is lxd and core20 snap in that file(var/lib/snapd/state.json), but the customer may not want to include those snaps in their private store, so skip checking that file((var/lib/snapd/state.json)) could solve this issue, or probably we can remove that file(var/lib/snapd/state.json) directly? I am not sure if remove the file(var/lib/snapd/state.json) will affect any other use cases, so that's why I think having a flag somewhere(probably in the yaml?) could be better
> What do you mean?
Previously, when we were using u-i tool 2.x to build 22.04 classic image, we had a hook(https:/ /git.launchpad. net/~lyoncore- team/lyoncore/ +git/iot- image-builds/ tree/hooks/ post-populate- rootfs. d/030-snap- prepare- image.sh? h=classic22. 04-uimg2# n17), and the code was copied from foundation team by one of my colleagues in CE team AFAIK
> You mean reset the preseeding anyway? Or skip the preseeding entirely? I am also not sure to understand why your problem is linked to resetting the preseeding.
I think the root cause is var/lib/ snapd/state. json is not handled properly. By deafult, there is lxd and core20 snap in that file(var/ lib/snapd/ state.json) , but the customer may not want to include those snaps in their private store, so skip checking that file((var/ lib/snapd/ state.json) ) could solve this issue, or probably we can remove that file(var/ lib/snapd/ state.json) directly? I am not sure if remove the file(var/ lib/snapd/ state.json) will affect any other use cases, so that's why I think having a flag somewhere(probably in the yaml?) could be better