summaryrefslogtreecommitdiffstats
path: root/meta/classes/uninative.bbclass
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-12-14 21:13:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-16 10:23:23 +0000
commitc4e2c59088765d1f1de7ec57cde91980f887c2ff (patch)
treea2fda8ac5916fb59a711e9220c2177008cca9347 /meta/classes/uninative.bbclass
parentd5e67725ac11e3296cad104470931ffa16824b90 (diff)
downloadpoky-c4e2c59088765d1f1de7ec57cde91980f887c2ff.tar.gz
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/uninative.bbclass')
-rw-r--r--meta/classes/uninative.bbclass18
1 files changed, 9 insertions, 9 deletions
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 11cbf9be80..177af73247 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -19,11 +19,11 @@ python uninative_event_fetchloader() {
19 loader isn't already present. 19 loader isn't already present.
20 """ 20 """
21 21
22 chksum = d.getVarFlag("UNINATIVE_CHECKSUM", d.getVar("BUILD_ARCH", True), True) 22 chksum = d.getVarFlag("UNINATIVE_CHECKSUM", d.getVar("BUILD_ARCH"), True)
23 if not chksum: 23 if not chksum:
24 bb.fatal("Uninative selected but not configured correctly, please set UNINATIVE_CHECKSUM[%s]" % d.getVar("BUILD_ARCH", True)) 24 bb.fatal("Uninative selected but not configured correctly, please set UNINATIVE_CHECKSUM[%s]" % d.getVar("BUILD_ARCH"))
25 25
26 loader = d.getVar("UNINATIVE_LOADER", True) 26 loader = d.getVar("UNINATIVE_LOADER")
27 loaderchksum = loader + ".chksum" 27 loaderchksum = loader + ".chksum"
28 if os.path.exists(loader) and os.path.exists(loaderchksum): 28 if os.path.exists(loader) and os.path.exists(loaderchksum):
29 with open(loaderchksum, "r") as f: 29 with open(loaderchksum, "r") as f:
@@ -36,13 +36,13 @@ python uninative_event_fetchloader() {
36 # Save and restore cwd as Fetch.download() does a chdir() 36 # Save and restore cwd as Fetch.download() does a chdir()
37 olddir = os.getcwd() 37 olddir = os.getcwd()
38 38
39 tarball = d.getVar("UNINATIVE_TARBALL", True) 39 tarball = d.getVar("UNINATIVE_TARBALL")
40 tarballdir = os.path.join(d.getVar("UNINATIVE_DLDIR", True), chksum) 40 tarballdir = os.path.join(d.getVar("UNINATIVE_DLDIR"), chksum)
41 tarballpath = os.path.join(tarballdir, tarball) 41 tarballpath = os.path.join(tarballdir, tarball)
42 42
43 if not os.path.exists(tarballpath): 43 if not os.path.exists(tarballpath):
44 bb.utils.mkdirhier(tarballdir) 44 bb.utils.mkdirhier(tarballdir)
45 if d.getVar("UNINATIVE_URL", True) == "unset": 45 if d.getVar("UNINATIVE_URL") == "unset":
46 bb.fatal("Uninative selected but not configured, please set UNINATIVE_URL") 46 bb.fatal("Uninative selected but not configured, please set UNINATIVE_URL")
47 47
48 localdata = bb.data.createCopy(d) 48 localdata = bb.data.createCopy(d)
@@ -85,7 +85,7 @@ python uninative_event_enable() {
85} 85}
86 86
87def enable_uninative(d): 87def enable_uninative(d):
88 loader = d.getVar("UNINATIVE_LOADER", True) 88 loader = d.getVar("UNINATIVE_LOADER")
89 if os.path.exists(loader): 89 if os.path.exists(loader):
90 bb.debug(2, "Enabling uninative") 90 bb.debug(2, "Enabling uninative")
91 d.setVar("NATIVELSBSTRING", "universal%s" % oe.utils.host_gcc_version(d)) 91 d.setVar("NATIVELSBSTRING", "universal%s" % oe.utils.host_gcc_version(d))
@@ -100,7 +100,7 @@ python uninative_changeinterp () {
100 if not (bb.data.inherits_class('native', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross', d)): 100 if not (bb.data.inherits_class('native', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross', d)):
101 return 101 return
102 102
103 sstateinst = d.getVar('SSTATE_INSTDIR', True) 103 sstateinst = d.getVar('SSTATE_INSTDIR')
104 for walkroot, dirs, files in os.walk(sstateinst): 104 for walkroot, dirs, files in os.walk(sstateinst):
105 for file in files: 105 for file in files:
106 if file.endswith(".so") or ".so." in file: 106 if file.endswith(".so") or ".so." in file:
@@ -121,7 +121,7 @@ python uninative_changeinterp () {
121 121
122 try: 122 try:
123 subprocess.check_output(("patchelf-uninative", "--set-interpreter", 123 subprocess.check_output(("patchelf-uninative", "--set-interpreter",
124 d.getVar("UNINATIVE_LOADER", True), f), 124 d.getVar("UNINATIVE_LOADER"), f),
125 stderr=subprocess.STDOUT) 125 stderr=subprocess.STDOUT)
126 except subprocess.CalledProcessError as e: 126 except subprocess.CalledProcessError as e:
127 bb.fatal("'%s' failed with exit code %d and the following output:\n%s" % 127 bb.fatal("'%s' failed with exit code %d and the following output:\n%s" %