Denys Dmytriyenko : recipes: python3 fixes
Module: meta-ti Branch: master Commit: 48ffe2b2da9b44cdb0ce055c008ab21843ec98b3 URL: http://arago-project.org/git/meta-ti.git?a=commit;h=48ffe2b2da9b44cdb0ce055c008ab21843ec98b3
Author: Denys Dmytriyenko <[email protected]> Date: Sat Oct 8 10:36:45 2016 +0000
recipes: python3 fixes
Signed-off-by Denys Dmytriyenko <[email protected]>
---
recipes-kernel/linux/setup-defconfig.inc | 2 +- recipes-ti/includes/ti-unpack.inc | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-)
recipes-kernel/linux/setup-defconfig.inc +1 -1
@@ -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
recipes-ti/includes/ti-unpack.inc +3 -5
@@ -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) } -