Move the 'udevadm' autocompletion script into a dedicated package.
Indeed, bash (and therefore, the bash-completion package) is not
always installed. But the 'udevadm' autocompletion script remains
in ${datadir}/bash-completion.

Creating a dedicated package allows better split, and avoids
installing it if the bash-completion package is missing.

Signed-off-by: Corentin Guillevic <[email protected]>
---
 meta/recipes-core/systemd/systemd_254.4.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git meta/recipes-core/systemd/systemd_254.4.bb 
meta/recipes-core/systemd/systemd_254.4.bb
index 0c12926bef..05cfc734bf 100644
--- meta/recipes-core/systemd/systemd_254.4.bb
+++ meta/recipes-core/systemd/systemd_254.4.bb
@@ -408,6 +408,7 @@ PACKAGE_BEFORE_PN = "\
     ${PN}-zsh-completion \
     libsystemd-shared \
     udev \
+    udev-bash-completion \
     udev-hwdb \
 "
 
@@ -721,6 +722,7 @@ FILES:libsystemd-shared = 
"${rootlibdir}/systemd/libsystemd-shared*.so"
 
 RPROVIDES:udev = "hotplug"
 
+RDEPENDS:udev-bash-completion += "bash-completion"
 RDEPENDS:udev-hwdb += "udev"
 
 FILES:udev += "${base_sbindir}/udevd \
@@ -782,10 +784,10 @@ FILES:udev += "${base_sbindir}/udevd \
                ${base_bindir}/systemd-hwdb \
                ${base_bindir}/udevadm \
                ${base_sbindir}/udevadm \
-               ${datadir}/bash-completion/completions/udevadm \
                ${systemd_system_unitdir}/systemd-hwdb-update.service \
               "
 
+FILES:udev-bash-completion = "${datadir}/bash-completion/completions/udevadm"
 FILES:udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \
                    "
 
-- 
2.39.2

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

Reply via email to