Commit Graph

9 Commits

Author SHA1 Message Date
Miguel Pires
79c5ac14b2 many: remove usages of deprecated io/ioutil package (#13768)
* many: remove usages of deprecated io/ioutil package

Signed-off-by: Miguel Pires <miguel.pires@canonical.com>

* .golangci.yml: remove errcheck ignore rule for io/ioutil

Signed-off-by: Miguel Pires <miguel.pires@canonical.com>

* run-checks: prevent new usages of io/ioutil

Signed-off-by: Miguel Pires <miguel.pires@canonical.com>

---------

Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
2024-04-03 23:23:24 +02:00
Maciej Borzecki
90d81284de kernel: export valid asset name regex
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-12-10 14:03:08 +01:00
Maciej Borzecki
204e43d75a kernel: match with gadget code and allow dashes in asset name, update validation
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-12-10 10:46:23 +01:00
Michael Vogt
fb39f2d373 kernel: update doc string (thanks to Maciej) 2020-09-02 08:54:28 +02:00
Michael Vogt
0996eec820 kernel: remove "edition" from kernel.yaml and add "update"
This commit changes the supported yaml for the kernel snap. For
the raspberry pi DTB use case the kernel assets are tightly
coupled with the kernel. So the edition would have to be bumped
everytime the kernel is build. So the edition does not make much
sense in this context. Hence a new "update" field that is boolean
for now but we may expand it later into a map. This map would
allow to specify what content items should get updated and which
should not get updated.
2020-08-28 07:57:58 +02:00
Michael Vogt
f3a63d5ef7 kernel: fix typo (thanks to Ian) 2020-08-20 07:22:42 +02:00
Michael Vogt
681bd6aed9 kernel: add basic asset name validation (alphanumeric only for now) 2020-08-14 17:41:19 +02:00
Michael Vogt
445a777b70 kernel: improve docstring, add XXX 2020-08-13 13:35:21 +02:00
Michael Vogt
23715d465a gadget,kernel: add new "kernel" and "gadget/edition" packages
This commit moves the kernel.yaml parsing into the kernel package
and extracts the gadget:editionNumber" helper into it's own
gadget/editon packages so that it can be shared between the
kernel and the gadget packages. Because meta/kernel.yaml is
optional it is not an error if it is missing.

Extra tests are also added.
2020-08-13 12:47:27 +02:00