4 Commits

Author SHA1 Message Date
Alfonso Sánchez-Beato
fb27fbc5d5 tests/component: check message on installation 2024-06-23 23:22:14 +01:00
alfonsosanchezbeato
83735930ae o/snapstate,tests: discard previous component on a component refresh (#13842)
* o/snapstate: store unlinked component information in change

As we will need this information in the component discard task.

* o/snapstate: discard previous component on a component refresh

Only one can be installed in the system at the same time.

* tests/component: check removal of older component after refresh

* o/snapstate: add function to retrieve component setup

Add function to find ComponentSetup for a task that is part of the
tasks created to do a component operation.

* o/snapstate: store unlinked component in ComponentSetup

* o/snapstate/backend: remove component related directories if empty

* o/snapstate: use SnapSetup to store the previous kernel revision

instead of having an object directly in the change.

* o/snapstate: store unlinked component in setup task

* o/snapstate: set previous kernel in setup task

instead of making it part of SnapSetup.

* o/snapstate: some additional tests
2024-04-19 00:18:19 +02:00
Alfonso Sánchez-Beato
4e3ece49f2 tests/main/component: check for symlinks for active component 2024-04-12 13:09:25 +01:00
alfonsosanchezbeato
0a375dc253 many: support sideloading components (#13454)
* daemon: support sideloading of components

* o/snapstate: check info in snap and component is coherent

Make sure that when we install a component it has been defined by the
owner snap and that the type is coherent betwee snap and component
metadata.

* cmd/snap: allow installation of local components

* tests/main: add spread test for components

* daemon: add component name to API data

* fixup! o/snapstate: check info in snap and component is coherent

* fixup! cmd/snap: allow installation of local components

* fixup! daemon: support sideloading of components

* fixup! tests/main: add spread test for components

* daemon: add helper for ErrorKindSnapNotInstalled errors

* fixup! daemon: support sideloading of components
2024-01-11 07:49:05 +00:00