diff mbox series

[5/5] ofono: use patch sent upstream instead of sed

Message ID 20180129171111.14502-5-ross.burton@intel.com
State Accepted
Commit 8b6c45dfdd6a7b469f5a0dd7308b25bdd4b1bf56
Headers show
Series [1/5] ofono: only depend on pygobject if its going to work | expand

Commit Message

Ross Burton Jan. 29, 2018, 5:11 p.m. UTC
Instead of using a sed to fix the hashbang in a test tool send a patch upstream
and use that.  This way we'll notice when the patch doesn't need to be applied
anymore.

Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 meta/recipes-connectivity/ofono/ofono.inc          |  3 ---
 .../ofono/ofono/use-python3.patch                  | 27 ++++++++++++++++++++++
 meta/recipes-connectivity/ofono/ofono_1.22.bb      |  1 +
 3 files changed, 28 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-connectivity/ofono/ofono/use-python3.patch

-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-connectivity/ofono/ofono.inc b/meta/recipes-connectivity/ofono/ofono.inc
index 4443a95c2f7..0472414b199 100644
--- a/meta/recipes-connectivity/ofono/ofono.inc
+++ b/meta/recipes-connectivity/ofono/ofono.inc
@@ -26,9 +26,6 @@  SYSTEMD_SERVICE_${PN} = "ofono.service"
 do_install_append() {
   install -d ${D}${sysconfdir}/init.d/
   install -m 0755 ${WORKDIR}/ofono ${D}${sysconfdir}/init.d/ofono
-
-  # Ofono still has one test tool that refers to Python 2 in the shebang
-  sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/ofono/test/set-ddr
 }
 
 PACKAGES =+ "${PN}-tests"
diff --git a/meta/recipes-connectivity/ofono/ofono/use-python3.patch b/meta/recipes-connectivity/ofono/ofono/use-python3.patch
new file mode 100644
index 00000000000..7b84075257a
--- /dev/null
+++ b/meta/recipes-connectivity/ofono/ofono/use-python3.patch
@@ -0,0 +1,27 @@ 
+set-ddr should use Python3 like all the other tests.
+
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 17b69cd1da4c5c5f732acb38ca1602446c567ee7 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 29 Jan 2018 11:31:25 +0000
+Subject: [PATCH] test/setddr: use Python 3
+
+All the other tests use Python 3, so this should to.
+---
+ test/set-ddr | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/set-ddr b/test/set-ddr
+index 5d061b95..33631f31 100755
+--- a/test/set-ddr
++++ b/test/set-ddr
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python3
+ 
+ import sys
+ import dbus
+-- 
+2.11.0
diff --git a/meta/recipes-connectivity/ofono/ofono_1.22.bb b/meta/recipes-connectivity/ofono/ofono_1.22.bb
index fd7ee15af1d..e57eaa77eb9 100644
--- a/meta/recipes-connectivity/ofono/ofono_1.22.bb
+++ b/meta/recipes-connectivity/ofono/ofono_1.22.bb
@@ -3,6 +3,7 @@  require ofono.inc
 SRC_URI  = "\
   ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
   file://ofono \
+  file://use-python3.patch \
 "
 SRC_URI[md5sum] = "2a683ab8e98448ad8bc5dc9868d2893e"
 SRC_URI[sha256sum] = "8e34a6696c300c9841b55e8dff640bd3096e49f5dbe55bbebaa69a71676f687e"