Patchwork [1/1] python-native: add link for python2

login
register
mail settings
Submitter Saul Wold
Date Sept. 8, 2011, 4:10 a.m.
Message ID <968b5b20ecf5bf9372217781135ead2acf8013a2.1315454900.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/11223/
State New, archived
Headers show

Comments

Saul Wold - Sept. 8, 2011, 4:10 a.m.
Add link for python2 as some configuration tools search from a python2
and could find the host python instead of the python-native.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 .../recipes-devtools/python/python-native_2.6.6.bb |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Saul Wold - Sept. 8, 2011, 6:09 a.m.
On 09/07/2011 09:10 PM, Saul Wold wrote:
> Add link for python2 as some configuration tools search from a python2
> and could find the host python instead of the python-native.
>
> Signed-off-by: Saul Wold<sgw@linux.intel.com>
> ---
>   .../recipes-devtools/python/python-native_2.6.6.bb |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/meta/recipes-devtools/python/python-native_2.6.6.bb b/meta/recipes-devtools/python/python-native_2.6.6.bb
> index 2b00d32..503bd96 100644
> --- a/meta/recipes-devtools/python/python-native_2.6.6.bb
> +++ b/meta/recipes-devtools/python/python-native_2.6.6.bb
> @@ -42,4 +42,7 @@ do_install() {
>   	for PYTHSCRIPT in `grep -rIl ${bindir}/python ${D}${bindir}`; do
>   		sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
>   	done
> +
> +	ln -sf ${D}${bindir}/python ${D}${bindir}/python2
> +
This is the right idea, but clearly this is the wrong execution for 
shared state, I tried a ${STAING_DIR...} variant but that also failed, 
what am I doing wrong?

I see this type of ln usage in other recipes.

Sau!

>   }

Patch

diff --git a/meta/recipes-devtools/python/python-native_2.6.6.bb b/meta/recipes-devtools/python/python-native_2.6.6.bb
index 2b00d32..503bd96 100644
--- a/meta/recipes-devtools/python/python-native_2.6.6.bb
+++ b/meta/recipes-devtools/python/python-native_2.6.6.bb
@@ -42,4 +42,7 @@  do_install() {
 	for PYTHSCRIPT in `grep -rIl ${bindir}/python ${D}${bindir}`; do
 		sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
 	done
+
+	ln -sf ${D}${bindir}/python ${D}${bindir}/python2
+
 }