Skip to contentSkip to conversation

openvswitch: add missing python modules to execute ovs-test program

PATCH In review Jagadeesh Krishnanjanappa 2 participants 2 messages Aug 9, 2016 – Aug 16, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openvswitch: add missing python modules to execute ovs-test program

ovs-test program requires python-twisted and ovstest python modules to execute successfully. The changes fix below errors:

-- snip --

root@qemux86:~# ovs-test
Traceback (most recent call last):
  File "/usr/bin/ovs-test", line 31, in <module>
    import twisted
ImportError: No module named twisted
root@qemux86:~# ovs-test
Traceback (most recent call last):
  File "/usr/bin/ovs-test", line 33, in <module>
    import ovstest.args as args
ImportError: No module named ovstest.args
root@qemux86:~#
-- snip --
---
 recipes-networking/openvswitch/openvswitch.inc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
recipes-networking/openvswitch/openvswitch.inc +5 -2
index fc515e9..3c70703 100644
@@ -15,7 +15,7 @@ DEPENDS += "bridge-utils openssl python perl"
 
 RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \
 	python perl perl-module-strict ${PN}-switch \
-        bash"
+        bash python-twisted"
 RDEPENDS_${PN}-testcontroller = "${PN} lsb ${PN}-pki"
 RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen"
 RDEPENDS_${PN}-pki = "${PN}"
@@ -69,7 +69,8 @@ FILES_${PN}-switch = "\
 FILES_${PN} += "${datadir}/ovsdbmonitor"
 FILES_${PN} += "/run"
 
-inherit autotools update-rc.d systemd
+FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/"
+inherit autotools update-rc.d systemd python-dir
 
 SYSTEMD_PACKAGES = "${PN}-switch"
 SYSTEMD_SERVICE_${PN}-switch = " \
@@ -102,6 +103,8 @@ do_install_append() {
 		${D}/${systemd_unitdir}/system/openvswitch-nonetwork.service
 
 	oe_runmake modules_install INSTALL_MOD_PATH=${D}
+	install -d ${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages
+	cp -r ${S}/python/ovstest/ ${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages/
 }
 
 pkg_postinst_${PN}-pki () {
Signature · 1 line
2.7.4
#1 lore raw

merged.

Bruce

Quoted 67 lines · Jagadeesh Krishnanjanappa

ovs-test program requires python-twisted and ovstest python modules to execute successfully. The changes fix below errors:

-- snip --

root@qemux86:~# ovs-test
Traceback (most recent call last):
  File "/usr/bin/ovs-test", line 31, in <module>
    import twisted
ImportError: No module named twisted
root@qemux86:~# ovs-test
Traceback (most recent call last):
  File "/usr/bin/ovs-test", line 33, in <module>
    import ovstest.args as args
ImportError: No module named ovstest.args
root@qemux86:~#
-- snip --
---
 recipes-networking/openvswitch/openvswitch.inc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
recipes-networking/openvswitch/openvswitch.inc +3 -2
index fc515e9..3c70703 100644
@@ -15,7 +15,7 @@ DEPENDS += "bridge-utils openssl python perl"
 
 RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \
        python perl perl-module-strict ${PN}-switch \
-        bash"
+        bash python-twisted"
 RDEPENDS_${PN}-testcontroller = "${PN} lsb ${PN}-pki"
 RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen"
 RDEPENDS_${PN}-pki = "${PN}"
@@ -69,7 +69,8 @@ FILES_${PN}-switch = "\
 FILES_${PN} += "${datadir}/ovsdbmonitor"
 FILES_${PN} += "/run"
 
-inherit autotools update-rc.d systemd
+FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/"
+inherit autotools update-rc.d systemd python-dir
 
 SYSTEMD_PACKAGES = "${PN}-switch"
 SYSTEMD_SERVICE_${PN}-switch = " \
@@ -102,6 +103,8 @@ do_install_append() {
                ${D}/${systemd_unitdir}/system/openvswitch-nonetwork.

service

        oe_runmake modules_install INSTALL_MOD_PATH=${D}
recipes-networking/openvswitch/openvswitch.inc +2 -0
+       install -d ${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages
+       cp -r ${S}/python/ovstest/ ${D}${libdir}/python${PYTHON_

BASEVERSION}/site-packages/
}

pkg_postinst_${PN}-pki () {
--
2.7.4

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"