diff options
author | Serhii Popovych <spopovyc@cisco.com> | 2017-03-28 19:31:59 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-31 10:10:29 +0100 |
commit | 253ce5d6c00d9b9806d6ac4f8e41f7dad33ede02 (patch) | |
tree | f263af4a008edade836c1421868117b88fd9d4f9 | |
parent | 43832aa6c1d542d0be729ec475d1a37ca15d216a (diff) | |
download | poky-253ce5d6c00d9b9806d6ac4f8e41f7dad33ede02.tar.gz |
distutils.bbclass: Fix path to python for scripts
Commit 11229de (distutils: Replacing path to native python by path
to python in the image to support python packages with
console-script setup) replaces path to python-native with path
to the python interpreter in the target image.
However on nativesdk builds ${bindir} expanded to the
${SDKPATHNATIVE}${prefix_nativesdk} making shebang line
pointing to the absolute path to env(1) in SDKPATHNATIVE
which may not be present if coreutils isn't part of nativesdk.
On the other hand commit cf63d90 (bitbake.conf: Define USRBINPATH
globally instead of individually) introduces USRBINPATH variable
which has correct value regarding build class and intended for
this use case.
v2: Rebased on top of new head.
Cc: XE-Linux <xe-linux-external@cisco.com>
(From OE-Core rev: 2a83c22a510e10b169015ce936eb51a6fc959ec1)
Signed-off-by: Serhii Popovych <spopovyc@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/distutils.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass index e5abdd1216..1930c35292 100644 --- a/meta/classes/distutils.bbclass +++ b/meta/classes/distutils.bbclass | |||
@@ -44,7 +44,7 @@ distutils_do_install() { | |||
44 | if test -e ${D}${bindir} ; then | 44 | if test -e ${D}${bindir} ; then |
45 | for i in ${D}${bindir}/* ; do \ | 45 | for i in ${D}${bindir}/* ; do \ |
46 | if [ ${PN} != "${BPN}-native" ]; then | 46 | if [ ${PN} != "${BPN}-native" ]; then |
47 | sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i | 47 | sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ python:g $i |
48 | fi | 48 | fi |
49 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i | 49 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i |
50 | done | 50 | done |
@@ -53,7 +53,7 @@ distutils_do_install() { | |||
53 | if [ -e ${D}${sbindir} ]; then | 53 | if [ -e ${D}${sbindir} ]; then |
54 | for i in ${D}${sbindir}/* ; do \ | 54 | for i in ${D}${sbindir}/* ; do \ |
55 | if [ ${PN} != "${BPN}-native" ]; then | 55 | if [ ${PN} != "${BPN}-native" ]; then |
56 | sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i | 56 | sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ python:g $i |
57 | fi | 57 | fi |
58 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i | 58 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i |
59 | done | 59 | done |