Skip to contentSkip to conversation

mtools uninative fix

PATCH In review Randy Witt 2 participants 4 messages Mar 5, 2016

lore
Share & tools
lore
author
#2 lore raw

PATCH 2/2 mtools: Make sure mcopy works when using uninative

In reply to Randy Witt

uninative changes the location of the IBM850 codepage used by mcopy. So make sure to set GCONV_PATH to the correct location when using uninative.

---
 meta/recipes-devtools/mtools/mtools_4.0.18.bb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta/recipes-devtools/mtools/mtools_4.0.18.bb +7 -1
index 479fd32..691539b 100644
@@ -50,6 +50,12 @@ do_install_prepend () {
 }
 
 do_install_append_class-native () {
-    create_wrapper ${D}${bindir}/mcopy \
+    if  [ "${UNINATIVE_LIBDIR}x" != "x" ]; then
+        GCONV_PATH=${UNINATIVE_LIBDIR}/gconv
+    else
         GCONV_PATH=${libdir}/gconv
+    fi
+
+    create_wrapper ${D}${bindir}/mcopy \
+        GCONV_PATH=$GCONV_PATH
 }
Signature · 1 line
2.5.0

Randy Witt

author
#0 lore raw

cover mtools uninative fix

These patchset is against master next to fix previous uninative patches. They most likely will not apply cleanly to master.

The following changes since commit dd359830ad267f9763e9c35493b2846fd2269234:

poky: Enable uninative (2016-03-04 17:15:56 +0000)

are available in the git repository at:

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

Randy Witt (2):
uninative.bbclass: Set UNINATIVE_LIBDIR if uninative is enabled
mtools: Make sure mcopy works when using uninative

 meta/classes/uninative.bbclass                | 5 ++++-
 meta/recipes-devtools/mtools/mtools_4.0.18.bb | 8 +++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)
Signature · 1 line
2.5.0
author
#1 lore raw

PATCH 1/2 uninative.bbclass: Set UNINATIVE_LIBDIR if uninative is enabled

Set a variable so other metadata can easily tell where uninative is located.

---
 meta/classes/uninative.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/classes/uninative.bbclass +4 -1
index 7f242de..99dee20 100644
@@ -80,9 +80,12 @@ python uninative_event_enable() {
     loader = d.getVar("UNINATIVE_LOADER", True)
     if os.path.exists(loader):
         bb.debug(2, "Enabling uninative")
+
+        uninative_dir = "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux"
+        d.setVar("UNINATIVE_LIBDIR", "%s${libdir_native}" % uninative_dir)
         d.setVar("NATIVELSBSTRING", "universal")
         d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
-        d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
+        d.prependVar("PATH", "%s${bindir_native}:" % uninative_dir)
 }
 
 python uninative_changeinterp () {
Signature · 1 line
2.5.0
#3 lore raw
In reply to Randy Witt
Quoted 3 lines · Randy Witt

These patchset is against master next to fix previous uninative patches. They
most likely will not apply cleanly to master.

Thanks for this. There were a couple of issues, I worried what would happen in the non-uninative case since GCONV_PATH is set unconditionally. This also didn't update both mtools recipes.

I'm testing a different version of this idea which I've just sent out but its based on this idea.

Cheers,

Richard