Skip to contentSkip to conversation

cacao: Use python3 in java wrapper script

PATCH In review Jacob Kroon 2 participants 2 messages Dec 12, 2019 – Dec 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cacao: Use python3 in java wrapper script

OE-Core has dropped python2 so switch to using python3.

---
 .../cacao-1.6.1-do-not-rely-on-absolute-paths.patch           | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-core/cacao/cacao-2d6f6c14daf9/cacao-1.6.1-do-not-rely-on-absolute-paths.patch +2 -2
index 2b046cf..665377b 100644
@@ -27,8 +27,8 @@ index 0790f02..2118de7 100644
 +
 +# if this shell script is invoked through symlink, we get invalid paths. As getting the real path to this file is
 +# very painful using only /bin/sh, python is used instead.
-+PYTHON_STR="import os; print os.path.dirname(os.path.realpath(os.readlink(\"${CURRENT_DIR}/java\"))) if os.path.islink(\"${CURRENT_DIR}/java\") else \"${CURRENT_DIR}\""
-+REAL_DIR=`python -c "${PYTHON_STR}"`
++PYTHON_STR="import os; print(os.path.dirname(os.path.realpath(os.readlink(\"${CURRENT_DIR}/java\"))) if os.path.islink(\"${CURRENT_DIR}/java\") else \"${CURRENT_DIR}\")"
++REAL_DIR=`python3 -c "${PYTHON_STR}"`
 +
 +PARENT_DIR=`dirname ${REAL_DIR}`
 +
Signature · 1 line
2.23.0
#1 lore raw

Hi,
this is a note to let you know that I've just added this patch to the master-next branch of the meta-java repository at
git://git.yoctoproject.org/meta-java

As soon as it has gone through some more testing it will likely be merged to the master branch.

If you have any questions, please let me know.

regards;Richard.L

Quoted 23 lines · Jacob Kroon

OE-Core has dropped python2 so switch to using python3.

---
  .../cacao-1.6.1-do-not-rely-on-absolute-paths.patch           | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
recipes-core/cacao/cacao-2d6f6c14daf9/cacao-1.6.1-do-not-rely-on-absolute-paths.patch +2 -2
index 2b046cf..665377b 100644
@@ -27,8 +27,8 @@ index 0790f02..2118de7 100644
  +
  +# if this shell script is invoked through symlink, we get invalid paths. As getting the real path to this file is
  +# very painful using only /bin/sh, python is used instead.
-+PYTHON_STR="import os; print os.path.dirname(os.path.realpath(os.readlink(\"${CURRENT_DIR}/java\"))) if os.path.islink(\"${CURRENT_DIR}/java\") else \"${CURRENT_DIR}\""
-+REAL_DIR=`python -c "${PYTHON_STR}"`
++PYTHON_STR="import os; print(os.path.dirname(os.path.realpath(os.readlink(\"${CURRENT_DIR}/java\"))) if os.path.islink(\"${CURRENT_DIR}/java\") else \"${CURRENT_DIR}\")"
++REAL_DIR=`python3 -c "${PYTHON_STR}"`
  +
  +PARENT_DIR=`dirname ${REAL_DIR}`
  +