From: Ming Liu <[email protected]>

This allows other recipes also install docker tool, for instance, when
'docker' pkgconfig being enabled in podman.

Signed-off-by: Ming Liu <[email protected]>
---
 recipes-containers/docker/docker.inc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/recipes-containers/docker/docker.inc 
b/recipes-containers/docker/docker.inc
index 48f7d3ec..861b4839 100644
--- a/recipes-containers/docker/docker.inc
+++ b/recipes-containers/docker/docker.inc
@@ -36,11 +36,15 @@ GO_IMPORT = "import"
 S = "${WORKDIR}/git"
 
 
-inherit systemd update-rc.d
+inherit systemd update-rc.d update-alternatives
 inherit go
 inherit goarch
 inherit pkgconfig
 
+ALTERNATIVE_PRIORITY = "60"
+ALTERNATIVE:${PN}-cli = "docker"
+ALTERNATIVE_LINK_NAME[docker] = "${bindir}/docker"
+
 do_configure[noexec] = "1"
 
 # Export for possible use in Makefiles, default value comes from go.bbclass
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8496): 
https://lists.yoctoproject.org/g/meta-virtualization/message/8496
Mute This Topic: https://lists.yoctoproject.org/mt/103107326/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to