Path correction for the bash completion. With this fix the
completion can be used as usual.

Signed-off-by: Michael Haener <[email protected]>
---
 recipes-bsp/efibootguard/efibootguard_0.10.bb | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/recipes-bsp/efibootguard/efibootguard_0.10.bb 
b/recipes-bsp/efibootguard/efibootguard_0.10.bb
index 45a67c5..c0182ab 100644
--- a/recipes-bsp/efibootguard/efibootguard_0.10.bb
+++ b/recipes-bsp/efibootguard/efibootguard_0.10.bb
@@ -34,7 +34,7 @@ EXTRA_OECONF = "--with-gnuefi-sys-dir=${STAGING_DIR_HOST} \
                 --with-gnuefi-lib-dir=${STAGING_LIBDIR}"
 
 FILES_${PN}-tools-bash-completion = " \
-    ${datadir}/${BPN}/completion/bash \
+    ${datadir}/bash-completion \
 "
 RDEPENDS_${PN}-tools-bash-completion = "bash-completion"
 
@@ -75,6 +75,16 @@ do_install:class-native () {
        ln -s bg_setenv ${D}${bindir}/bg_printenv
 }
 
+do_install:append() {
+    # Fix bash-completion path
+    if [ -d ${D}/${datadir}/${BPN}/completion/bash ]; then
+        install -d ${D}/${datadir}/bash-completion/completions
+        mv ${D}/${datadir}/${BPN}/completion/bash/bg_printenv.bash 
${D}/${datadir}/bash-completion/completions/bg_printenv
+        mv ${D}/${datadir}/${BPN}/completion/bash/bg_setenv.bash 
${D}/${datadir}/bash-completion/completions/bg_setenv
+        rm -rf ${D}/${datadir}/${BPN}/completion/bash
+    fi
+}
+
 do_deploy:class-native () {
 }
 
-- 
2.34.1

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/20220308194325.2292841-2-michael.haener%40siemens.com.

Reply via email to