diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2021-04-03 21:51:31 +0200 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-04-06 20:34:26 -0400 |
| commit | 04f8621d8213630e3072321c68089ac147e21ebe (patch) | |
| tree | 0478365a34ae96ab61584583653f7689aaf4dab9 | |
| parent | 4c073402756248acd32b209b7b8a5e1fe328b13b (diff) | |
| download | meta-virtualization-04f8621d8213630e3072321c68089ac147e21ebe.tar.gz | |
cri-o, podman, packagegroup-container: replace anonymous python function calling bb.parse.SkipRecipe with conditional PNBLACKLISTs
* PNBLACKLISTs are IMHO a bit easier to read and easier to override from distro
which e.g. provides own recipe for libseccomp
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | recipes-containers/cri-o/cri-o_git.bb | 16 | ||||
| -rw-r--r-- | recipes-containers/podman/podman_git.bb | 10 | ||||
| -rw-r--r-- | recipes-core/packagegroups/packagegroup-container.bb | 10 |
3 files changed, 3 insertions, 33 deletions
diff --git a/recipes-containers/cri-o/cri-o_git.bb b/recipes-containers/cri-o/cri-o_git.bb index 2d6187a8..0ac5ddc5 100644 --- a/recipes-containers/cri-o/cri-o_git.bb +++ b/recipes-containers/cri-o/cri-o_git.bb | |||
| @@ -43,21 +43,7 @@ RDEPENDS_${PN} = " \ | |||
| 43 | libdevmapper \ | 43 | libdevmapper \ |
| 44 | " | 44 | " |
| 45 | 45 | ||
| 46 | python __anonymous() { | 46 | PNBLACKLIST[cri-o] ?= "${@bb.utils.contains('BBFILE_COLLECTIONS', 'security', bb.utils.contains('BBFILE_COLLECTIONS', 'selinux', '', 'Depends on libselinux from meta-selinux which is not included', d), 'Depends on libseccomp from meta-security which is not included', d)}" |
| 47 | msg = "" | ||
| 48 | # ERROR: Nothing PROVIDES 'libseccomp' (but /buildarea/layers/meta-virtualization/recipes-containers/cri-o/cri-o_git.bb DEPENDS on or otherwise requires it). | ||
| 49 | # ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. | ||
| 50 | # Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'cri-o', 'libseccomp'] | ||
| 51 | if 'security' not in d.getVar('BBFILE_COLLECTIONS').split(): | ||
| 52 | msg += "Make sure meta-security should be present as it provides 'libseccomp'" | ||
| 53 | raise bb.parse.SkipRecipe(msg) | ||
| 54 | # ERROR: Nothing PROVIDES 'libselinux' (but /buildarea/layers/meta-virtualization/recipes-containers/cri-o/cri-o_git.bb DEPENDS on or otherwise requires it). | ||
| 55 | # ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. | ||
| 56 | # Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'cri-o', 'libselinux'] | ||
| 57 | elif 'selinux' not in d.getVar('BBFILE_COLLECTIONS').split(): | ||
| 58 | msg += "Make sure meta-selinux should be present as it provides 'libselinux'" | ||
| 59 | raise bb.parse.SkipRecipe(msg) | ||
| 60 | } | ||
| 61 | 47 | ||
| 62 | PACKAGES =+ "${PN}-config" | 48 | PACKAGES =+ "${PN}-config" |
| 63 | 49 | ||
diff --git a/recipes-containers/podman/podman_git.bb b/recipes-containers/podman/podman_git.bb index a552a7fa..62ae024c 100644 --- a/recipes-containers/podman/podman_git.bb +++ b/recipes-containers/podman/podman_git.bb | |||
| @@ -14,15 +14,7 @@ DEPENDS = " \ | |||
| 14 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ | 14 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ |
| 15 | " | 15 | " |
| 16 | 16 | ||
| 17 | python __anonymous() { | 17 | PNBLACKLIST[podman] ?= "${@bb.utils.contains('BBFILE_COLLECTIONS', 'security', '', 'Depends on libseccomp from meta-security which is not included', d)}" |
| 18 | msg = "" | ||
| 19 | # ERROR: Nothing PROVIDES 'libseccomp' (but meta-virtualization/recipes-containers/podman/ DEPENDS on or otherwise requires it). | ||
| 20 | # ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. | ||
| 21 | # Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'podman', 'libseccomp'] | ||
| 22 | if 'security' not in d.getVar('BBFILE_COLLECTIONS').split(): | ||
| 23 | msg += "Make sure meta-security should be present as it provides 'libseccomp'" | ||
| 24 | raise bb.parse.SkipRecipe(msg) | ||
| 25 | } | ||
| 26 | 18 | ||
| 27 | SRCREV = "288fb688964cb7fc7086d0728daa1f5f6b726dd6" | 19 | SRCREV = "288fb688964cb7fc7086d0728daa1f5f6b726dd6" |
| 28 | SRC_URI = " \ | 20 | SRC_URI = " \ |
diff --git a/recipes-core/packagegroups/packagegroup-container.bb b/recipes-core/packagegroups/packagegroup-container.bb index b3b0d4c3..b06a7c74 100644 --- a/recipes-core/packagegroups/packagegroup-container.bb +++ b/recipes-core/packagegroups/packagegroup-container.bb | |||
| @@ -44,12 +44,4 @@ RDEPENDS_packagegroup-containerd = " \ | |||
| 44 | virtual/containerd \ | 44 | virtual/containerd \ |
| 45 | " | 45 | " |
| 46 | 46 | ||
| 47 | python __anonymous() { | 47 | PNBLACKLIST[packagegroup-container] ?= "${@bb.utils.contains('BBFILE_COLLECTIONS', 'security', '', 'Depends on podman which depends on libseccomp from meta-security which is not included', d)}" |
| 48 | msg = "" | ||
| 49 | # ERROR: Nothing PROVIDES 'libseccomp' (but meta-virtualization/recipes-containers/podman/ DEPENDS on or otherwise requires it). | ||
| 50 | # ERROR: Required build target 'meta-world-pkgdata' has no buildable providers. | ||
| 51 | # Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'podman', 'libseccomp'] | ||
| 52 | if 'security' not in d.getVar('BBFILE_COLLECTIONS').split(): | ||
| 53 | msg += "Make sure meta-security should be present as it provides 'libseccomp'" | ||
| 54 | raise bb.parse.SkipRecipe(msg) | ||
| 55 | } | ||
