Files
Andrew Phelps 90c2e4c534 many: modify snap run to understand component hooks (#13976)
* snap, s/snaptest: add function for reading the ComponentInfo of the current revision of a component for a snap revision

* s/snapenv, c/snap: add support for component hooks to ExtendEnvForRun

* c/snap: update run to be able to run component hooks

* c/snap: refactor runSnapConfine to operate on a runnable that can represent snap hooks, component hooks, and apps

This commit doesn't need to be here, and things will work without it.
But things were getting a bit complicated in runSnapConfine with
arguments that represented different things based on what we were
running.

* c/snap-exec: handle running component hooks in snap-exec

* c/snap-exec: move parsing of snap-exec target into execHook and execApp

* snap: make error message when failing to parse current component revision a bit better

* c/snap: add IsHook method to runnable type for easier checking

* s/snaptest: use os.Symlink rather than atomic variant in test code

* snap, s/snapdir, c/snap: fix import cycle issue with hook from snapdir into snap

* c/snap, c/snap-exec: docs and panicking default for NewContainerFromDir

* c/snap, c/snap-exec: set up hook for snap.NewContainerFromDir

* c/snap: remove TODO about getting component revision

* c/snap, c/snap-exec: use _ imports rather than initializing hook manually

* s/naming: add ParseComponentRef function

* snap, o/s/backend, daemon: replace ComponentLinkPath and ComponentInstallDate param with naming.ComponentRef

* snap: use ComponentLinkPath helper in ComponentLinkPath

* s/snapdir: add doc comment for NewContainerForDir

* Revert "snap: use ComponentLinkPath helper in ComponentLinkPath"

This reverts commit 9a56c379779490f798613db31aa66b2b177ddd3d.

* Revert "snap, o/s/backend, daemon: replace ComponentLinkPath and ComponentInstallDate param with naming.ComponentRef"

This reverts commit ca39dc1e60174d769ef2345f1e4b58d63f0f7528.

* Revert "s/naming: add ParseComponentRef function"

This reverts commit a3a9130f6d617bc817a76d884a84c1b83282bb46.

* snap: use ComponentLinkPath helper in ComponentLinkPath

* snap: remove whitespace

* snap: update doc comment on ComponentLinkPath to mention usage constraints of the ContainerPlaceInfo param

* snap: replace NOTE with TODO
2024-06-26 16:49:38 +01:00
..