openembedded-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [meta-networking][PATCH] netplan: fix hardcoded path for /lib/netplan
@ 2021-10-28  6:56 Yi Zhao
  0 siblings, 0 replies; only message in thread
From: Yi Zhao @ 2021-10-28  6:56 UTC (permalink / raw)
  To: openembedded-devel

The hardcoded path /lib/netplan causes a runtime error on multilib
image:
$ netplan try
An error occurred: [Errno 2] No such file or directory: '/lib/netplan/generate'

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 meta-networking/recipes-connectivity/netplan/netplan_0.103.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta-networking/recipes-connectivity/netplan/netplan_0.103.bb b/meta-networking/recipes-connectivity/netplan/netplan_0.103.bb
index 3527bceeb..1de739eeb 100644
--- a/meta-networking/recipes-connectivity/netplan/netplan_0.103.bb
+++ b/meta-networking/recipes-connectivity/netplan/netplan_0.103.bb
@@ -40,6 +40,7 @@ do_install() {
 	install -m 644 ${S}/netplan/cli/commands/*.py ${D}${datadir}/netplan/netplan/cli/commands
 	install -m 755 ${S}/src/netplan.script ${D}${datadir}/netplan/
 	ln -srf ${D}${datadir}/netplan/netplan.script ${D}${sbindir}/netplan
+	sed -i -e "s#/lib/netplan/generate#${base_libdir}/netplan/generate#" ${D}${datadir}/netplan/netplan/cli/utils.py
 
 	install -d ${D}/${systemd_unitdir}/system ${D}${systemd_unitdir}/system-generators
 	ln -srf ${D}/${base_libdir}/netplan/generate ${D}${systemd_unitdir}/system-generators
@@ -49,6 +50,7 @@ do_install() {
 		install -m 755 ${S}/netplan-dbus ${D}${base_libdir}/netplan
 		install -m 644 ${S}/dbus/io.netplan.Netplan.conf ${D}${datadir}/dbus-1/system.d
 		install -m 644 ${S}/dbus/io.netplan.Netplan.service ${D}${datadir}/dbus-1/system-services
+		sed -i -e "s#^Exec=/lib/#Exec=${base_libdir}/#" ${D}${datadir}/dbus-1/system-services/io.netplan.Netplan.service
 	fi
 
 	install -m 755 ${S}/libnetplan.so.0.0 ${D}${libdir}
-- 
2.25.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-28  6:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28  6:56 [meta-networking][PATCH] netplan: fix hardcoded path for /lib/netplan Yi Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).