All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-virtualization][walnascar][master][PATCH] containerd: make cni_networking conditional
@ 2025-05-28  5:48 changqing.li
  2025-06-05  2:29 ` Bruce Ashfield
  0 siblings, 1 reply; 6+ messages in thread
From: changqing.li @ 2025-05-28  5:48 UTC (permalink / raw)
  To: meta-virtualization

From: Changqing Li <changqing.li@windriver.com>

make cni_networking conditional, when k3s, k8s is enabled, the
networking configuration will be provided by the orchestration package,
containerd-cni is not needed. This is for fix the following error:
PACKAGE_CLASSES = "package_deb"
do_rootfs failed with error:
dpkg: error processing archive /path/to/oe-rootfs-repo/corei7-64/./kubernetes-cni_v1.32.0+git0+5fe148234f_release-r0.deb (--unpack):
trying to overwrite '/etc/cni/net.d/cni-containerd-net.conflist', which is also in package containerd-cni v2.0.5-r0

Refer [1], "--no-force-overwrite" is set for dpkg, so above error
occurred.

[1] https://git.openembedded.org/openembedded-core/commit/?id=cb95ba079960411775c57ab864d266e15a6292d1

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 recipes-containers/containerd/containerd_git.bb      | 2 +-
 recipes-core/packagegroups/packagegroup-container.bb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/recipes-containers/containerd/containerd_git.bb b/recipes-containers/containerd/containerd_git.bb
index c683fbeb..def7591a 100644
--- a/recipes-containers/containerd/containerd_git.bb
+++ b/recipes-containers/containerd/containerd_git.bb
@@ -102,4 +102,4 @@ RDEPENDS:${PN} += " ${VIRTUAL-RUNTIME_container_runtime}"
 ## This may need to be made conditional on K3S or similar being
 ## configured in the distro, since we may have collisions.
 CNI_NETWORKING_FILES ?= "${UNPACKDIR}/cni-containerd-net.conflist"
-inherit cni_networking
+inherit_defer ${@bb.utils.contains_any('DISTRO_FEATURES', 'k3s k8s', '', 'cni_networking', d)}
diff --git a/recipes-core/packagegroups/packagegroup-container.bb b/recipes-core/packagegroups/packagegroup-container.bb
index f5e20344..8cbcf28e 100644
--- a/recipes-core/packagegroups/packagegroup-container.bb
+++ b/recipes-core/packagegroups/packagegroup-container.bb
@@ -69,7 +69,7 @@ RDEPENDS:packagegroup-oci = " \
 RDEPENDS:packagegroup-containerd = " \
     virtual-containerd \
     packagegroup-cni \
-    containerd-cni \
+    ${@bb.utils.contains_any('DISTRO_FEATURES','k3s k8s','','containerd-cni',d)} \
     nerdctl \
     tini \
 "
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread
[parent not found: <18439AD6FDF85A0A.10936@lists.yoctoproject.org>]

end of thread, other threads:[~2025-06-11 12:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-28  5:48 [meta-virtualization][walnascar][master][PATCH] containerd: make cni_networking conditional changqing.li
2025-06-05  2:29 ` Bruce Ashfield
2025-06-11  7:19   ` Changqing Li
2025-06-11 12:40     ` Bruce Ashfield
     [not found] <18439AD6FDF85A0A.10936@lists.yoctoproject.org>
2025-06-09  1:09 ` Changqing Li
2025-06-09  3:44   ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.