mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 12:50:22 +02:00
podman: add build flexibility to dependencies
In a similar manner to cri-o, we don't want to make meta-selinux or meta-security a hard dependency to meta-virtualization. So we implement a similar anonymous python check that allows the recipe to be skipped if the dependent layers are not present (and hence we are yocto compatible). If we get more than two recipes doing layer checks (this is the 2nd), we can move the functionality to a class. We also make the runc dependency be virtual/runc versus picking a specific provider (even if only runc-opencontainers has been tested). Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
805c77a518
commit
14f14957c9
|
@ -14,6 +14,22 @@ DEPENDS = " \
|
|||
${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
|
||||
"
|
||||
|
||||
python __anonymous() {
|
||||
msg = ""
|
||||
# ERROR: Nothing PROVIDES 'libseccomp' (but /buildarea/layers/meta-virtualization/recipes-containers/cri-o/cri-o_git.bb DEPENDS on or otherwise requires it).
|
||||
# ERROR: Required build target 'meta-world-pkgdata' has no buildable providers.
|
||||
# Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'cri-o', 'libseccomp']
|
||||
if 'security' not in d.getVar('BBFILE_COLLECTIONS').split():
|
||||
msg += "Make sure meta-security should be present as it provides 'libseccomp'"
|
||||
raise bb.parse.SkipRecipe(msg)
|
||||
# ERROR: Nothing PROVIDES 'libselinux' (but /buildarea/layers/meta-virtualization/recipes-containers/cri-o/cri-o_git.bb DEPENDS on or otherwise requires it).
|
||||
# ERROR: Required build target 'meta-world-pkgdata' has no buildable providers.
|
||||
# Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'cri-o', 'libselinux']
|
||||
elif 'selinux' not in d.getVar('BBFILE_COLLECTIONS').split():
|
||||
msg += "Make sure meta-selinux should be present as it provides 'libselinux'"
|
||||
raise bb.parse.SkipRecipe(msg)
|
||||
}
|
||||
|
||||
SRCREV = "00057929f5acfd98341964d85722383363376d52"
|
||||
SRC_URI = " \
|
||||
git://github.com/containers/libpod.git;branch=master \
|
||||
|
@ -89,5 +105,7 @@ FILES_${PN} += " \
|
|||
${sysconfdir}/cni \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN} += "conmon runc-opencontainers iptables cni skopeo"
|
||||
# Note that runc-opencontainers is the only currently tested
|
||||
# runc provider.
|
||||
RDEPENDS_${PN} += "conmon virtual/runc iptables cni skopeo"
|
||||
RRECOMMENDS_${PN} += "slirp4netns"
|
||||
|
|
Loading…
Reference in New Issue
Block a user