1
0
mirror of https://git.yoctoproject.org/meta-ti synced 2026-06-05 10:21:52 +00:00

recipes: python3 fixes

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
This commit is contained in:
Denys Dmytriyenko
2016-10-08 10:36:45 +00:00
parent 02a43b25f7
commit 48ffe2b2da
2 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -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
+3 -5
View File
@@ -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)
}