Skip to contentSkip to conversation

systemd: avoid parsing error when 'networkd' is enabled in PACKAGECONFIG

PATCH In review Chen Qi 2 participants 3 messages Mar 2, 2015

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

cover systemd: avoid parsing error when 'networkd' is enabled in PACKAGECONFIG

The following changes since commit bc393da30306891617adbb5eda5f57c9209ff24f:

build-appliance-image: Update to master head revision (2015-02-27 21:15:53 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib ChenQi/systemd-networkd
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/systemd-networkd

Chen Qi (1):
systemd: avoid parsing error when 'networkd' is enabled in
PACKAGECONFIG

 meta/recipes-core/systemd/systemd_219.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 systemd: avoid parsing error when 'networkd' is enabled in PACKAGECONFIG

If 'networkd' is enabled in PACKAGECONFIG, the do_install variable cannot be correctly expanded. Error message is like below.

Failure expanding variable do_install: ShellSyntaxError: LexToken(Fi,'fi',0,0) followed by:
LexToken(NEWLINE,'\n',0,0)

This patch fixes the above problem.

---
 meta/recipes-core/systemd/systemd_219.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_219.bb +1 -1
index f245239..d785255 100644
@@ -169,7 +169,7 @@ 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}${libdir}/tmpfiles.d/systemd.conf ]; then
-		${@bb.utils.contains('PACKAGECONFIG', 'networkd', '', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)}
+		${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)}
 	fi
 }
 
Signature · 1 line
1.9.1
#2 lore raw
Quoted 19 lines · Chen Qi

If 'networkd' is enabled in PACKAGECONFIG, the do_install variable cannot be correctly expanded. Error message is like below.

Failure expanding variable do_install: ShellSyntaxError: LexToken(Fi,'fi',0,0) followed by:
LexToken(NEWLINE,'\n',0,0)

This patch fixes the above problem.

---
 meta/recipes-core/systemd/systemd_219.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_219.bb +0 -0
index f245239..d785255 100644

meta/recipes-core/systemd/systemd_219.bb do_install() { · line 172

Quoted 5 lines
meta/recipes-core/systemd/systemd_219.bb +1 -1
@@ -169,7 +169,7 @@ 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}${libdir}/tmpfiles.d/systemd.conf ]; then
-               ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)}
+               ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)}

I did exactly this locally. Works fine.

Quoted 11 lines
meta/recipes-core/systemd/systemd_219.bb +0 -1
        fi
 }
 
--

1.9.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core