This avoids the following warning:

  WARNING: .../meta/recipes-core/systemd/systemd_250.1.bb: Var
  <do_install>:1: DeprecationWarning: invalid escape sequence \$

seen when doing `devtool finish --force-patch-refresh systemd meta`.

Signed-off-by: Peter Kjellerstedt <[email protected]>
---

I have no idea why the warning is only seen when doing `devtool 
finish`...

 meta/recipes-core/systemd/systemd_250.1.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_250.1.bb 
b/meta/recipes-core/systemd/systemd_250.1.bb
index b05905b764..4dd668833a 100644
--- a/meta/recipes-core/systemd/systemd_250.1.bb
+++ b/meta/recipes-core/systemd/systemd_250.1.bb
@@ -297,8 +297,9 @@ do_install() {
 
        # this file is needed to exist if networkd is disabled but timesyncd is 
still in use since timesyncd checks it
        # for existence else it fails
-       if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
-               ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i 
-e "\$ad /run/systemd/netif/links 0755 root root -" 
${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
+       if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ] &&
+          ! ${@bb.utils.contains('PACKAGECONFIG', 'networkd', 'true', 'false', 
d)}; then
+               echo 'd /run/systemd/netif/links 0755 root root -' 
>>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
        fi
        if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', 
d)}; then
                echo 'L! ${sysconfdir}/resolv.conf - - - - 
../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160505): 
https://lists.openembedded.org/g/openembedded-core/message/160505
Mute This Topic: https://lists.openembedded.org/mt/88390229/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to