In the case when no udev rules are provided by the recipe the do_install
step of systemd is failing with:

    install: cannot stat '<WORKDIR>/*.rules': No such file or directory

By default the systemd recipe provides touchscreen.rules but in the
case this is unwanted on target the install step fails. This solution
is dynamic and search for *.rules files in $WORKDIR. If found they are
installed.

Signed-off-by: Peter Bergin <pe...@berginkonsult.se>
---
 meta/recipes-core/systemd/systemd_246.2.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_246.2.bb 
b/meta/recipes-core/systemd/systemd_246.2.bb
index 238cd4741f..af10e4212b 100644
--- a/meta/recipes-core/systemd/systemd_246.2.bb
+++ b/meta/recipes-core/systemd/systemd_246.2.bb
@@ -232,7 +232,9 @@ do_install() {
 
        install -d ${D}${sysconfdir}/udev/rules.d/
        install -d ${D}${sysconfdir}/tmpfiles.d
-       install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
+       for rule in $(find ${WORKDIR} -maxdepth 1 -type f -name "*.rules"); do
+               install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/
+       done
 
        install -m 0644 ${WORKDIR}/00-create-volatile.conf 
${D}${sysconfdir}/tmpfiles.d/
 
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#142596): 
https://lists.openembedded.org/g/openembedded-core/message/142596
Mute This Topic: https://lists.openembedded.org/mt/76872838/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to