Skip to contentSkip to conversation

ofono: only depend on pygobject if its going to work

PATCH In review Ross Burton 2 participants 6 messages Jan 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 ofono: only depend on pygobject if its going to work

---
 meta/recipes-connectivity/ofono/ofono.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-connectivity/ofono/ofono.inc +3 -3
index 676a0c0042a..4443a95c2f7 100644
@@ -5,7 +5,7 @@ LICENSE  = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
                     file://src/ofono.h;beginline=1;endline=20;md5=3ce17d5978ef3445def265b98899c2ee"
 
-inherit autotools pkgconfig update-rc.d systemd bluetooth
+inherit autotools pkgconfig update-rc.d systemd bluetooth gobject-introspection-data
 
 DEPENDS  = "dbus glib-2.0 udev mobile-broadband-provider-info"
 
@@ -29,7 +29,6 @@ do_install_append() {
 
   # 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"
@@ -39,4 +38,5 @@ RRECOMMENDS_${PN} += "kernel-module-tun mobile-broadband-provider-info"
 
 FILES_${PN} += "${systemd_unitdir}"
 FILES_${PN}-tests = "${libdir}/${BPN}/test"
-RDEPENDS_${PN}-tests = "python3 python3-pygobject python3-dbus"
+RDEPENDS_${PN}-tests = "python3 python3-dbus"
+RDEPENDS_${PN}-tests += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)}"
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/5 bluez5: only depend on pygobject if its going to work

---
 meta/recipes-connectivity/bluez5/bluez5.inc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-connectivity/bluez5/bluez5.inc +3 -2
index e78f174c5cb..2607a058228 100644
@@ -55,7 +55,7 @@ S = "${WORKDIR}/bluez-${PV}"
 
 CVE_PRODUCT = "bluez"
 
-inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest
+inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest gobject-introspection-data
 
 EXTRA_OECONF = "\
   --enable-test \
@@ -129,7 +129,8 @@ def get_noinst_tools_paths (d, bb, tools):
 
 FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS'))}"
 
-RDEPENDS_${PN}-testtools += "python3 python3-dbus python3-pygobject"
+RDEPENDS_${PN}-testtools += "python3 python3-dbus"
+RDEPENDS_${PN}-testtools += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)}"
 
 SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'bluetooth.service', '', d)}"
 INITSCRIPT_PACKAGES = "${PN}"
Signature · 1 line
2.11.0
#2 lore raw

PATCH 3/5 meta: don't use deprecated functions from utils.bbclass

In reply to Ross Burton

These functions were moved to meta/lib/oe in 2010 and the base_* functions in utils.bbclass were intended to be a short-term compatibility layer. They're still used in a few places, so update the callers to use the new functions.

---
 meta/classes/image.bbclass                           |  2 +-
 meta/classes/image_types.bbclass                     |  2 +-
 meta/classes/kernel.bbclass                          |  2 +-
 meta/classes/libc-package.bbclass                    | 20 ++++++++++----------
 meta/classes/module-base.bbclass                     |  2 +-
 meta/conf/bitbake.conf                               |  2 +-
 meta/conf/distro/include/security_flags.inc          |  2 +-
 meta/conf/machine/qemuarm.conf                       |  2 +-
 meta/recipes-connectivity/openssl/openssl10.inc      |  2 +-
 meta/recipes-core/glibc/glibc-package.inc            |  4 ++--
 meta/recipes-devtools/gcc/libgcc.inc                 |  2 +-
 meta/recipes-graphics/mesa/mesa.inc                  |  2 +-
 .../x11-common/xserver-nodm-init_3.0.bb              |  2 +-
 .../xorg-driver/xf86-video-intel_git.bb              |  2 +-
 meta/recipes-support/icu/icu.inc                     |  4 ++--
 15 files changed, 26 insertions(+), 26 deletions(-)
meta/classes/image.bbclass +1 -1
index 4531aa2a57a..7abb9182120 100644
@@ -17,7 +17,7 @@ RRECOMMENDS += "${PACKAGE_INSTALL_ATTEMPTONLY}"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
-TESTIMAGECLASS = "${@base_conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}"
+TESTIMAGECLASS = "${@oe.utils.conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}"
 inherit ${TESTIMAGECLASS}
 
 # IMAGE_FEATURES may contain any available package group
meta/classes/image_types.bbclass +1 -1
index b17c435274e..ae3e6edef33 100644
@@ -228,7 +228,7 @@ IMAGE_CMD_f2fs () {
 EXTRA_IMAGECMD = ""
 
 inherit siteinfo kernel-arch
-JFFS2_ENDIANNESS ?= "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-l', '-b', d)}"
+JFFS2_ENDIANNESS ?= "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-l', '-b', d)}"
 JFFS2_ERASEBLOCK ?= "0x40000"
 EXTRA_IMAGECMD_jffs2 ?= "--pad ${JFFS2_ENDIANNESS} --eraseblock=${JFFS2_ERASEBLOCK} --no-cleanmarkers"
 
meta/classes/kernel.bbclass +1 -1
index 1ecb840caf4..d181e2b6e0a 100644
@@ -547,7 +547,7 @@ RDEPENDS_${KERNEL_PACKAGE_NAME} = "${KERNEL_PACKAGE_NAME}-base"
 # not wanted in images as standard
 RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image"
 PKG_${KERNEL_PACKAGE_NAME}-image = "${KERNEL_PACKAGE_NAME}-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
-RDEPENDS_${KERNEL_PACKAGE_NAME}-image += "${@base_conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux', '', d)}"
+RDEPENDS_${KERNEL_PACKAGE_NAME}-image += "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux', '', d)}"
 PKG_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name('${KERNEL_VERSION}')}"
 RPROVIDES_${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-${KERNEL_VERSION}"
 ALLOW_EMPTY_${KERNEL_PACKAGE_NAME} = "1"
meta/classes/libc-package.bbclass +10 -10
index 739adce6943..2e7cd25297e 100644
@@ -113,9 +113,9 @@ python package_do_split_gconvs () {
         bb.error("datadir not defined")
         return
 
-    gconv_libdir = base_path_join(libdir, "gconv")
-    charmap_dir = base_path_join(datadir, "i18n", "charmaps")
-    locales_dir = base_path_join(datadir, "i18n", "locales")
+    gconv_libdir = oe.path.join(libdir, "gconv")
+    charmap_dir = oe.path.join(datadir, "i18n", "charmaps")
+    locales_dir = oe.path.join(datadir, "i18n", "locales")
     binary_locales_dir = d.getVar('localedir')
 
     def calc_gconv_deps(fn, pkg, file_regex, output_pattern, group):
@@ -189,7 +189,7 @@ python package_do_split_gconvs () {
 
     # Read in supported locales and associated encodings
     supported = {}
-    with open(base_path_join(d.getVar('WORKDIR'), "SUPPORTED")) as f:
+    with open(oe.path.join(d.getVar('WORKDIR'), "SUPPORTED")) as f:
         for line in f.readlines():
             try:
                 locale, charset = line.rstrip().split()
@@ -231,12 +231,12 @@ python package_do_split_gconvs () {
     commands = {}
 
     def output_locale_binary(name, pkgname, locale, encoding):
-        treedir = base_path_join(d.getVar("WORKDIR"), "locale-tree")
-        ldlibdir = base_path_join(treedir, d.getVar("base_libdir"))
+        treedir = oe.path.join(d.getVar("WORKDIR"), "locale-tree")
+        ldlibdir = oe.path.join(treedir, d.getVar("base_libdir"))
         path = d.getVar("PATH")
-        i18npath = base_path_join(treedir, datadir, "i18n")
-        gconvpath = base_path_join(treedir, "iconvdata")
-        outputpath = base_path_join(treedir, binary_locales_dir)
+        i18npath = oe.path.join(treedir, datadir, "i18n")
+        gconvpath = oe.path.join(treedir, "iconvdata")
+        outputpath = oe.path.join(treedir, binary_locales_dir)
 
         use_cross_localedef = d.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF") or "0"
         if use_cross_localedef == "1":
@@ -344,7 +344,7 @@ python package_do_split_gconvs () {
         d.appendVar('RDEPENDS_%s' % metapkg, ' ' + pkg)
 
     if use_bin == "compile":
-        makefile = base_path_join(d.getVar("WORKDIR"), "locale-tree", "Makefile")
+        makefile = oe.path.join(d.getVar("WORKDIR"), "locale-tree", "Makefile")
         m = open(makefile, "w")
         m.write("all: %s\n\n" % " ".join(commands.keys()))
         for cmd in commands:
meta/classes/module-base.bbclass +1 -1
index 6fe77c01b7e..f851b851639 100644
@@ -12,7 +12,7 @@ export CROSS_COMPILE = "${TARGET_PREFIX}"
 # we didn't pick the name.
 export KBUILD_OUTPUT = "${STAGING_KERNEL_BUILDDIR}"
 
-export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}"
+export KERNEL_VERSION = "${@oe.utils.read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}"
 KERNEL_OBJECT_SUFFIX = ".ko"
 
 # kernel modules are generally machine specific
meta/conf/bitbake.conf +1 -1
index 01416ba7411..1473bfb0824 100644
@@ -220,7 +220,7 @@ EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}"
 # Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
 # otherwise it is the same as PN and P
 SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -crosssdk -cross-canadian"
-BPN = "${@base_prune_suffix(d.getVar('PN'), d.getVar('SPECIAL_PKGSUFFIX').split(), d)}"
+BPN = "${@oe.utils.prune_suffix(d.getVar('PN'), d.getVar('SPECIAL_PKGSUFFIX').split(), d)}"
 BP = "${BPN}-${PV}"
 
 # Package info.
meta/conf/distro/include/security_flags.inc +1 -1
index ab2062b78f5..7ea1049edff 100644
@@ -9,7 +9,7 @@ GCCPIE ?= "--enable-default-pie"
 
 # _FORTIFY_SOURCE requires -O1 or higher, so disable in debug builds as they use
 # -O0 which then results in a compiler warning.
-lcl_maybe_fortify = "${@base_conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=2',d)}"
+lcl_maybe_fortify = "${@oe.utils.conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=2',d)}"
 
 # Error on use of format strings that represent possible security problems
 SECURITY_STRINGFORMAT ?= "-Wformat -Wformat-security -Werror=format-security"
meta/conf/machine/qemuarm.conf +1 -1
index c8932ddc592..aa112f51401 100644
@@ -17,4 +17,4 @@ QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,115200 console=tty"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND = "-show-cursor -usb -device usb-tablet -device virtio-rng-pci"
 PREFERRED_VERSION_linux-yocto ??= "4.12%"
-QB_DTB = "${@base_version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"
+QB_DTB = "${@oe.utils.version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"
meta/recipes-connectivity/openssl/openssl10.inc +1 -1
index bd96551c625..02a0e16e972 100644
@@ -25,7 +25,7 @@ TERMIO_libc-musl = "-DTERMIOS"
 TERMIO ?= "-DTERMIO"
 # Avoid binaries being marked as requiring an executable stack since it 
 # doesn't(which causes and this causes issues with SELinux
-CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
+CFLAG = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
 	 ${TERMIO} ${CFLAGS} -Wall -Wa,--noexecstack"
 
 export DIRS = "crypto ssl apps"
meta/recipes-core/glibc/glibc-package.inc +2 -2
index 4d3dc679b40..824b185b3ac 100644
@@ -118,10 +118,10 @@ do_install_append_aarch64 () {
 		# The aarch64 ABI says the dynamic linker -must- be /lib/ld-linux-aarch64[_be].so.1
 		install -d ${D}${nonarch_base_libdir}
 		if [ -e ${D}${base_libdir}/ld-linux-aarch64.so.1 ]; then
-			ln -s ${@base_path_relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64.so.1 \
+			ln -s ${@oe.path.relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64.so.1 \
 				${D}${nonarch_base_libdir}/ld-linux-aarch64.so.1
 		elif [ -e ${D}${base_libdir}/ld-linux-aarch64_be.so.1 ]; then
-			ln -s ${@base_path_relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64_be.so.1 \
+			ln -s ${@oe.path.relative('${nonarch_base_libdir}', '${base_libdir}')}/ld-linux-aarch64_be.so.1 \
 				${D}${nonarch_base_libdir}/ld-linux-aarch64_be.so.1
 		fi
 	fi
meta/recipes-devtools/gcc/libgcc.inc +1 -1
index 1500fb5acea..5f1dff609c0 100644
@@ -28,7 +28,7 @@ LICENSE_${PN}-dbg = "GPL-3.0-with-GCC-exception"
 
 FILES_${PN}-dev = "\
     ${base_libdir}/libgcc*.so \
-    ${@base_conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
+    ${@oe.utils.conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
     ${libdir}/${TARGET_SYS}/${BINV}* \
     ${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \
 "
meta/recipes-graphics/mesa/mesa.inc +1 -1
index 15967959a41..88ba0050d5e 100644
@@ -77,7 +77,7 @@ GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnav
 GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'imx', ',imx', '', d)}"
 GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', 'radeonsi,r600', '', d)}"
 PACKAGECONFIG[r600] = ""
-GALLIUMDRIVERS_LLVM33_ENABLED = "${@base_version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}"
+GALLIUMDRIVERS_LLVM33_ENABLED = "${@oe.utils.version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}"
 GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@',${GALLIUMDRIVERS_LLVM33}' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
 GALLIUMDRIVERS_append_x86 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
 GALLIUMDRIVERS_append_x86-64 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb +1 -1
index 345b5896969..a77c56445c8 100644
@@ -60,7 +60,7 @@ do_install() {
     fi
 }
 
-RDEPENDS_${PN} = "xinit ${@base_conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}"
+RDEPENDS_${PN} = "xinit ${@oe.utils.conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}"
 
 INITSCRIPT_NAME = "xserver-nodm"
 INITSCRIPT_PARAMS = "start 9 5 . stop 20 0 1 2 3 6 ."
meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb +1 -1
index 9aff9d8c229..2623cb2f317 100644
@@ -38,7 +38,7 @@ PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc xcb-util"
 PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,libxinerama libxrandr libxdamage libxfixes libxcursor libxtst libxext libxrender"
 
 # --enable-kms-only option is required by ROOTLESS_X
-EXTRA_OECONF += '${@base_conditional( "ROOTLESS_X", "1", " --enable-kms-only", "", d )}'
+EXTRA_OECONF += '${@oe.utils.conditional( "ROOTLESS_X", "1", " --enable-kms-only", "", d )}'
 
 COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
 
meta/recipes-support/icu/icu.inc +2 -2
index b9ac59a1add..983118cd619 100644
@@ -28,8 +28,8 @@ EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
 EXTRA_OECONF_class-native = ""
 EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
 
-EXTRA_OECONF_append_class-target = "${@base_conditional('SITEINFO_ENDIANNESS', 'be', ' --with-data-packaging=archive', '', d)}"
-TARGET_CXXFLAGS_append = "${@base_conditional('SITEINFO_ENDIANNESS', 'be', ' -DICU_DATA_DIR=\\""${datadir}/${BPN}/${PV}\\""', '', d)}"
+EXTRA_OECONF_append_class-target = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' --with-data-packaging=archive', '', d)}"
+TARGET_CXXFLAGS_append = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' -DICU_DATA_DIR=\\""${datadir}/${BPN}/${PV}\\""', '', d)}"
 
 # strtod_l() is not supported by musl; also xlocale.h is missing
 # It is not possible to disable its use via configure switches or env vars
Signature · 1 line
2.11.0
#3 lore raw

PATCH 4/5 classes/utils: remove compatibility functions

In reply to Ross Burton

These base_* functions were moved into meta/lib/oe back in 2010 and wrappers left in utils.bbclass for compatibility. It's been eight years, so I think it's time to remove them.

---
 meta/classes/utils.bbclass | 41 -----------------------------------------
 1 file changed, 41 deletions(-)
meta/classes/utils.bbclass +0 -41
index 32cae7e3125..4f016e3d002 100644
@@ -1,44 +1,3 @@
-# For compatibility
-def base_path_join(a, *p):
-    return oe.path.join(a, *p)
-
-def base_path_relative(src, dest):
-    return oe.path.relative(src, dest)
-
-def base_path_out(path, d):
-    return oe.path.format_display(path, d)
-
-def base_read_file(filename):
-    return oe.utils.read_file(filename)
-
-def base_ifelse(condition, iftrue = True, iffalse = False):
-    return oe.utils.ifelse(condition, iftrue, iffalse)
-
-def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
-    return oe.utils.conditional(variable, checkvalue, truevalue, falsevalue, d)
-
-def base_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
-    return oe.utils.less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
-
-def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
-    return oe.utils.version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
-
-def base_contains(variable, checkvalues, truevalue, falsevalue, d):
-    bb.note('base_contains is deprecated, please use bb.utils.contains instead.')
-    return bb.utils.contains(variable, checkvalues, truevalue, falsevalue, d)
-
-def base_both_contain(variable1, variable2, checkvalue, d):
-    return oe.utils.both_contain(variable1, variable2, checkvalue, d)
-
-def base_prune_suffix(var, suffixes, d):
-    return oe.utils.prune_suffix(var, suffixes, d)
-
-def oe_filter(f, str, d):
-    return oe.utils.str_filter(f, str, d)
-
-def oe_filter_out(f, str, d):
-    return oe.utils.str_filter_out(f, str, d)
-
 def machine_paths(d):
     """List any existing machine specific filespath directories"""
     machine = d.getVar("MACHINE")
Signature · 1 line
2.11.0
#4 lore raw

PATCH 5/5 ofono: use patch sent upstream instead of sed

In reply to Ross Burton

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.

---
 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
meta/recipes-connectivity/ofono/ofono.inc +0 -3
index 4443a95c2f7..0472414b199 100644
@@ -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"
meta/recipes-connectivity/ofono/ofono/use-python3.patch new file +27 -0
new file mode 100644
index 00000000000..7b84075257a
@@ -0,0 +1,27 @@
+set-ddr should use Python3 like all the other tests.
+
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <[email protected]>
+
+From 17b69cd1da4c5c5f732acb38ca1602446c567ee7 Mon Sep 17 00:00:00 2001
+From: Ross Burton <[email protected]>
+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
meta/recipes-connectivity/ofono/ofono_1.22.bb +1 -0
index fd7ee15af1d..e57eaa77eb9 100644
@@ -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"
Signature · 1 line
2.11.0
#5 lore raw

✗ patchtest: failure for "ofono: only depend on pygobjec..." and 4 more

In reply to Ross Burton

== Series Details ==

Series: "ofono: only depend on pygobjec..." and 4 more
Revision: 1
URL : https://patchwork.openembedded.org/series/10753/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Issue Upstream-Status is Submitted, but it is not mentioned where [test_upstream_status_presence_format]

  Suggested fix    Include where use-python3.patch was submitted
  Current          Upstream-Status: Submitted
  Standard format  Upstream-Status: Submitted [where]

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe