[meta-ti] Denys Dmytriyenko : recipes: python3 fixes
Arago Project git
git at arago-project.org
Mon Oct 10 02:49:07 PDT 2016
Module: meta-ti
Branch: master
Commit: 48ffe2b2da9b44cdb0ce055c008ab21843ec98b3
URL: http://arago-project.org/git/meta-ti.git?a=commit;h=48ffe2b2da9b44cdb0ce055c008ab21843ec98b3
Author: Denys Dmytriyenko <denys at ti.com>
Date: Sat Oct 8 10:36:45 2016 +0000
recipes: python3 fixes
Signed-off-by: Denys Dmytriyenko <denys at ti.com>
---
recipes-kernel/linux/setup-defconfig.inc | 2 +-
recipes-ti/includes/ti-unpack.inc | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/recipes-kernel/linux/setup-defconfig.inc b/recipes-kernel/linux/setup-defconfig.inc
index 7faf7f2..dcf2ada 100644
--- a/recipes-kernel/linux/setup-defconfig.inc
+++ b/recipes-kernel/linux/setup-defconfig.inc
@@ -4,7 +4,7 @@ def get_git_revision(p):
import subprocess
try:
- return subprocess.Popen("git rev-parse HEAD 2>/dev/null ", cwd=p, shell=True, stdout=subprocess.PIPE).communicate()[0].rstrip()
+ return subprocess.Popen("git rev-parse HEAD 2>/dev/null ", cwd=p, shell=True, stdout=subprocess.PIPE, universal_newlines=True).communicate()[0].rstrip()
except OSError:
return None
diff --git a/recipes-ti/includes/ti-unpack.inc b/recipes-ti/includes/ti-unpack.inc
index 9101044..1922db6 100644
--- a/recipes-ti/includes/ti-unpack.inc
+++ b/recipes-ti/includes/ti-unpack.inc
@@ -17,7 +17,6 @@ python do_unpack () {
TI_BIN_UNPK_WDEXT ?= ""
python ti_bin_do_unpack() {
-
import os
# InstallJammer requires 32bit version of glibc
@@ -48,11 +47,11 @@ python ti_bin_do_unpack() {
cmd_list = cmd_string.split( ":" )
# Make the InstallJammer binary executable so we can run it
- os.chmod(binfile, 0755)
+ os.chmod(binfile, 0o755)
# Run the InstallJammer binary and accept the EULA
filename = "HOME=%s ./%s %s" % (workdir, binfile, arg_string)
-
+
# Test executable by printing installer version or help screen (--version currently broken for some installers)
# - this is currently broken in some IJ installers - comment out for now
#if os.system(filename + " --version") != 0:
@@ -74,10 +73,9 @@ python ti_bin_do_unpack() {
tarfile = bb.data.expand(tarfile, localdata)
tcmd = 'tar x --no-same-owner -f %s -C %s' % (tarfile, workdir)
if os.system(tcmd) != 0:
- print "ERROR: ti-eula-unpack: failed to extract tarfile"
+ print("ERROR: ti-eula-unpack: failed to extract tarfile")
raise bb.build.FuncFailed()
# Return to the previous directory
os.chdir(save_cwd)
}
-
More information about the meta-ti
mailing list