Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/3] #11891 - Port bmaptools to Python 3
@ 2017-09-06 12:08 Ed Bartosh
  2017-09-06 12:08 ` [PATCH v2 1/3] bmap-tools: upgrade to v3.4 Ed Bartosh
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ed Bartosh @ 2017-09-06 12:08 UTC (permalink / raw)
  To: openembedded-core

Hi,

This patchset switches bmap-tools to usage of native Python 3.
As bmap-tools is the only recipe in oe-core that uses Python 2
this change should help to stop building native Python 2.

Changes in v2: Used commit id instead of release tag (thanks to Ross)
               Fixed wrong bug spec in commit messages (thanks to Patchwork)

The following changes since commit 091b759dcec3068eb0b6bffdc5763fd6cc84d0a9:

  wic: selftest: add test_wic_rm_ext test case (2017-09-06 13:02:02 +0300)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib ed/wip
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wip

Ed Bartosh (3):
  bmap-tools: upgrade to v3.4
  bmap-tools: switch to Python 3
  wic: run bmaptool with native Python3

 .../bmap-tools/{bmap-tools_3.2.bb => bmap-tools_3.4.bb}          | 9 +++------
 scripts/lib/wic/plugins/imager/direct.py                         | 6 ++++--
 2 files changed, 7 insertions(+), 8 deletions(-)
 rename meta/recipes-support/bmap-tools/{bmap-tools_3.2.bb => bmap-tools_3.4.bb} (79%)

--
Regards,
Ed


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 1/3] bmap-tools: upgrade to v3.4
  2017-09-06 12:08 [PATCH v2 0/3] #11891 - Port bmaptools to Python 3 Ed Bartosh
@ 2017-09-06 12:08 ` Ed Bartosh
  2017-09-06 12:08 ` [PATCH v2 2/3] bmap-tools: switch to Python 3 Ed Bartosh
  2017-09-06 12:08 ` [PATCH v2 3/3] wic: run bmaptool with native Python3 Ed Bartosh
  2 siblings, 0 replies; 4+ messages in thread
From: Ed Bartosh @ 2017-09-06 12:08 UTC (permalink / raw)
  To: openembedded-core

Upgraded to the latest upstream release.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 .../bmap-tools/{bmap-tools_3.2.bb => bmap-tools_3.4.bb}               | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-support/bmap-tools/{bmap-tools_3.2.bb => bmap-tools_3.4.bb} (84%)

diff --git a/meta/recipes-support/bmap-tools/bmap-tools_3.2.bb b/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
similarity index 84%
rename from meta/recipes-support/bmap-tools/bmap-tools_3.2.bb
rename to meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
index b8ebe630815..3f75fad44b4 100644
--- a/meta/recipes-support/bmap-tools/bmap-tools_3.2.bb
+++ b/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
@@ -10,7 +10,7 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 SRC_URI = "git://github.com/01org/bmap-tools.git"
-SRCREV = "96702a869220ab20830db916ec4ac595e1d97f92"
+SRCREV = "9dad724104df265442226972a1e310813f9ffcba"
 
 S = "${WORKDIR}/git"
 
@@ -21,5 +21,5 @@ inherit setuptools
 BBCLASSEXTEND = "native"
 
 do_install_append_class-native() {
-    sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' ${D}${bindir}/bmaptool
+    sed -i -e 's|^#!.*/usr/bin/python-native/python|#! /usr/bin/env nativepython|' ${D}${bindir}/bmaptool
 }
-- 
2.13.5



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/3] bmap-tools: switch to Python 3
  2017-09-06 12:08 [PATCH v2 0/3] #11891 - Port bmaptools to Python 3 Ed Bartosh
  2017-09-06 12:08 ` [PATCH v2 1/3] bmap-tools: upgrade to v3.4 Ed Bartosh
@ 2017-09-06 12:08 ` Ed Bartosh
  2017-09-06 12:08 ` [PATCH v2 3/3] wic: run bmaptool with native Python3 Ed Bartosh
  2 siblings, 0 replies; 4+ messages in thread
From: Ed Bartosh @ 2017-09-06 12:08 UTC (permalink / raw)
  To: openembedded-core

bmap-tools is the only recipe in oe-core that still uses
Python 2. Switching it to Python 3 should help to get rid of
building native Python 2 and its dependencies.

[YOCTO #11891]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 meta/recipes-support/bmap-tools/bmap-tools_3.4.bb | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb b/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
index 3f75fad44b4..7454f9db751 100644
--- a/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
+++ b/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
@@ -16,10 +16,7 @@ S = "${WORKDIR}/git"
 
 RDEPENDS_${PN} = "python-core python-compression python-mmap"
 
-inherit setuptools
+inherit python3native
+inherit setuptools3
 
 BBCLASSEXTEND = "native"
-
-do_install_append_class-native() {
-    sed -i -e 's|^#!.*/usr/bin/python-native/python|#! /usr/bin/env nativepython|' ${D}${bindir}/bmaptool
-}
-- 
2.13.5



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 3/3] wic: run bmaptool with native Python3
  2017-09-06 12:08 [PATCH v2 0/3] #11891 - Port bmaptools to Python 3 Ed Bartosh
  2017-09-06 12:08 ` [PATCH v2 1/3] bmap-tools: upgrade to v3.4 Ed Bartosh
  2017-09-06 12:08 ` [PATCH v2 2/3] bmap-tools: switch to Python 3 Ed Bartosh
@ 2017-09-06 12:08 ` Ed Bartosh
  2 siblings, 0 replies; 4+ messages in thread
From: Ed Bartosh @ 2017-09-06 12:08 UTC (permalink / raw)
  To: openembedded-core

Modified wic code to run bmaptool using native Python3
from wic-tools native sysroot.

[YOCTO #11891]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 scripts/lib/wic/plugins/imager/direct.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 5765bbb527b..a6abc3d09ef 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -213,8 +213,10 @@ class DirectPlugin(ImagerPlugin):
         # Generate .bmap
         if self.bmap:
             logger.debug("Generating bmap file for %s", disk_name)
-            exec_native_cmd("bmaptool create %s -o %s.bmap" % (full_path, full_path),
-                            self.native_sysroot)
+            python = os.path.join(self.native_sysroot, 'usr/bin/python3-native/python3')
+            bmaptool = os.path.join(self.native_sysroot, 'usr/bin/bmaptool')
+            exec_native_cmd("%s %s create %s -o %s.bmap" % \
+                            (python, bmaptool, full_path, full_path), self.native_sysroot)
         # Compress the image
         if self.compressor:
             logger.debug("Compressing disk %s with %s", disk_name, self.compressor)
-- 
2.13.5



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-06 12:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-06 12:08 [PATCH v2 0/3] #11891 - Port bmaptools to Python 3 Ed Bartosh
2017-09-06 12:08 ` [PATCH v2 1/3] bmap-tools: upgrade to v3.4 Ed Bartosh
2017-09-06 12:08 ` [PATCH v2 2/3] bmap-tools: switch to Python 3 Ed Bartosh
2017-09-06 12:08 ` [PATCH v2 3/3] wic: run bmaptool with native Python3 Ed Bartosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox