Re: [OE-core] [OE-Core][PATCH] {python, python3}-native: fix TypeError

2015-06-16 Thread Richard Purdie
On Tue, 2015-06-16 at 14:33 +0900, Changhyeok Bae wrote:
 Doesn't this mean BUILD_SYS or HOST_SYS weren't set in the environment?
 - You're right. The default env value of BUILD_SYS and HOST_SYS is  
 (empty).
 - I wonder that the original patch 
 (12-distutils-prefix-is-inside-staging-area.patch) to add  is required?
 
 Wouldn't this patch just mean you get a value of something like None?
 - My patch is to prevent errors in runtime.
 - Do you have any other good idea?

My concern is that just having a value of None means the code trying
to use this variable will probably do the wrong thing. We should try and
fix the underlying problem of BUILD_SYS bot being set when it should be,
rather than just hide the runtime error.

How you do that depends on when the runtime error is occurring which I
know little about...

Cheers,

Richard



-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH] {python, python3}-native: fix TypeError

2015-06-15 Thread Changhyeok Bae
Doesn't this mean BUILD_SYS or HOST_SYS weren't set in the environment?
- You're right. The default env value of BUILD_SYS and HOST_SYS is  (empty).
- I wonder that the original patch 
(12-distutils-prefix-is-inside-staging-area.patch) to add  is required?

Wouldn't this patch just mean you get a value of something like None?
- My patch is to prevent errors in runtime.
- Do you have any other good idea?

Thanks
Changhyeok
-Original Message-
From: Richard Purdie [mailto:richard.pur...@linuxfoundation.org] 
Sent: Monday, June 15, 2015 3:55 PM
To: Changhyeok Bae
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [OE-Core][PATCH] {python,python3}-native: fix TypeError

On Tue, 2015-06-09 at 14:08 +0900, Changhyeok Bae wrote:
 g-ir-core in meta-gir is building with python-native.
 When the g-ir-core(v1.42.0) is building, following error is occurred.
 
 Error in g-ir-core:
 EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( 
 os.getenv(BUILD_SYS), os.getenv(HOST_SYS) )
 | TypeError: expected a character buffer object

Doesn't this mean BUILD_SYS or HOST_SYS weren't set in the environment?
Wouldn't this patch just mean you get a value of something like None?

Cheers,

Richard

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH] {python, python3}-native: fix TypeError

2015-06-15 Thread Richard Purdie
On Tue, 2015-06-09 at 14:08 +0900, Changhyeok Bae wrote:
 g-ir-core in meta-gir is building with python-native.
 When the g-ir-core(v1.42.0) is building, following error is occurred.
 
 Error in g-ir-core:
 EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( 
 os.getenv(BUILD_SYS), os.getenv(HOST_SYS) )
 | TypeError: expected a character buffer object

Doesn't this mean BUILD_SYS or HOST_SYS weren't set in the environment?
Wouldn't this patch just mean you get a value of something like None?

Cheers,

Richard

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH] {python, python3}-native: fix TypeError

2015-06-15 Thread Changhyeok Bae
ping

-Original Message-
From: Changhyeok Bae [mailto:changhyeok@lge.com] 
Sent: Tuesday, June 09, 2015 2:08 PM
To: openembedded-core@lists.openembedded.org
Cc: Changhyeok Bae
Subject: [OE-Core][PATCH] {python,python3}-native: fix TypeError

g-ir-core in meta-gir is building with python-native.
When the g-ir-core(v1.42.0) is building, following error is occurred.

Error in g-ir-core:
EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace(
os.getenv(BUILD_SYS), os.getenv(HOST_SYS) )
| TypeError: expected a character buffer object

Signed-off-by: Changhyeok Bae changhyeok@lge.com
---
 ...2-distutils-prefix-is-inside-staging-area.patch |4 ++--
 .../recipes-devtools/python/python-native_2.7.9.bb |2 +-
 .../python/python3-native_3.4.3.bb |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git
a/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-s
taging-area.patch
b/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-s
taging-area.patch
index f89aaff..b9cc4d9 100644
---
a/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-s
taging-area.patch
+++ b/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-
+++ inside-staging-area.patch
@@ -12,8 +12,8 @@ Upstream-Status: Inappropriate [embedded specific]
  # These are needed in a couple of spots, so just compute them once.
 -PREFIX = os.path.normpath(sys.prefix)
 -EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-+PREFIX = os.path.normpath(sys.prefix).replace( os.getenv(BUILD_SYS), 
-+os.getenv(HOST_SYS) ) EXEC_PREFIX = 
-+os.path.normpath(sys.exec_prefix).replace( os.getenv(BUILD_SYS), 
-+os.getenv(HOST_SYS) )
++PREFIX = os.path.normpath(sys.prefix).replace( 
++str(os.getenv(BUILD_SYS)), str(os.getenv(HOST_SYS)) ) EXEC_PREFIX 
++= os.path.normpath(sys.exec_prefix).replace( 
++str(os.getenv(BUILD_SYS)), str(os.getenv(HOST_SYS)) )
  
  # Path to the base directory of the project. On Windows the binary may
  # live in project/PCBuild9.  If we're dealing with an x64 Windows build,
diff --git a/meta/recipes-devtools/python/python-native_2.7.9.bb
b/meta/recipes-devtools/python/python-native_2.7.9.bb
index 34f5c29..5be7bb9 100644
--- a/meta/recipes-devtools/python/python-native_2.7.9.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.9.bb
@@ -2,7 +2,7 @@ require python.inc
 
 EXTRANATIVEPATH += bzip2-native
 DEPENDS = openssl-native bzip2-replacement-native zlib-native
readline-native sqlite3-native
-PR = ${INC_PR}.1
+PR = ${INC_PR}.2
 
 SRC_URI += \
 file://05-enable-ctypes-cross-build.patch \ diff --git
a/meta/recipes-devtools/python/python3-native_3.4.3.bb
b/meta/recipes-devtools/python/python3-native_3.4.3.bb
index 464ff05..105c0c9 100644
--- a/meta/recipes-devtools/python/python3-native_3.4.3.bb
+++ b/meta/recipes-devtools/python/python3-native_3.4.3.bb
@@ -1,6 +1,6 @@
 require recipes-devtools/python/python.inc
 
-PR = ${INC_PR}.0
+PR = ${INC_PR}.1
 PYTHON_MAJMIN = 3.4
 DISTRO_SRC_URI ?= file://sitecustomize.py
 DISTRO_SRC_URI_linuxstdbase = 
--
1.7.9.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] {python,python3}-native: fix TypeError

2015-06-08 Thread Changhyeok Bae
g-ir-core in meta-gir is building with python-native.
When the g-ir-core(v1.42.0) is building, following error is occurred.

Error in g-ir-core:
EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( 
os.getenv(BUILD_SYS), os.getenv(HOST_SYS) )
| TypeError: expected a character buffer object

Signed-off-by: Changhyeok Bae changhyeok@lge.com
---
 ...2-distutils-prefix-is-inside-staging-area.patch |4 ++--
 .../recipes-devtools/python/python-native_2.7.9.bb |2 +-
 .../python/python3-native_3.4.3.bb |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch
 
b/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch
index f89aaff..b9cc4d9 100644
--- 
a/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch
+++ 
b/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch
@@ -12,8 +12,8 @@ Upstream-Status: Inappropriate [embedded specific]
  # These are needed in a couple of spots, so just compute them once.
 -PREFIX = os.path.normpath(sys.prefix)
 -EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-+PREFIX = os.path.normpath(sys.prefix).replace( os.getenv(BUILD_SYS), 
os.getenv(HOST_SYS) )
-+EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( 
os.getenv(BUILD_SYS), os.getenv(HOST_SYS) )
++PREFIX = os.path.normpath(sys.prefix).replace( str(os.getenv(BUILD_SYS)), 
str(os.getenv(HOST_SYS)) )
++EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( 
str(os.getenv(BUILD_SYS)), str(os.getenv(HOST_SYS)) )
  
  # Path to the base directory of the project. On Windows the binary may
  # live in project/PCBuild9.  If we're dealing with an x64 Windows build,
diff --git a/meta/recipes-devtools/python/python-native_2.7.9.bb 
b/meta/recipes-devtools/python/python-native_2.7.9.bb
index 34f5c29..5be7bb9 100644
--- a/meta/recipes-devtools/python/python-native_2.7.9.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.9.bb
@@ -2,7 +2,7 @@ require python.inc
 
 EXTRANATIVEPATH += bzip2-native
 DEPENDS = openssl-native bzip2-replacement-native zlib-native readline-native 
sqlite3-native
-PR = ${INC_PR}.1
+PR = ${INC_PR}.2
 
 SRC_URI += \
 file://05-enable-ctypes-cross-build.patch \
diff --git a/meta/recipes-devtools/python/python3-native_3.4.3.bb 
b/meta/recipes-devtools/python/python3-native_3.4.3.bb
index 464ff05..105c0c9 100644
--- a/meta/recipes-devtools/python/python3-native_3.4.3.bb
+++ b/meta/recipes-devtools/python/python3-native_3.4.3.bb
@@ -1,6 +1,6 @@
 require recipes-devtools/python/python.inc
 
-PR = ${INC_PR}.0
+PR = ${INC_PR}.1
 PYTHON_MAJMIN = 3.4
 DISTRO_SRC_URI ?= file://sitecustomize.py
 DISTRO_SRC_URI_linuxstdbase = 
-- 
1.7.9.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core