meta: ability to specify capabilities for stages

Add new stage metadata `CAPABILITIES` where stages can request
additional capabilities that are not in the default set.
Currently this is not used by any stage since the default set
contains the sum of all needed capabilities.
This commit is contained in:
Christian Kellner 2022-04-22 17:40:40 +02:00 committed by Tom Gundersen
parent bdcc9ea218
commit d14e5f3ee8
2 changed files with 15 additions and 3 deletions

View file

@ -157,7 +157,7 @@ class Stage:
build_root.mount_boot = bool(self.build)
# drop capabilities other than `DEFAULT_CAPABILITIES`
build_root.caps = DEFAULT_CAPABILITIES
build_root.caps = DEFAULT_CAPABILITIES | self.info.caps
tmpdir = store.tempdir(prefix="buildroot-tmp-")
tmpdir = cm.enter_context(tmpdir)