summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@jci.com>2019-01-17 14:29:17 +0000
committerAndré Draszik <andre.draszik@jci.com>2019-01-17 14:29:17 +0000
commit74df05a7f0fd698cbbe65b9bf925f186891426ca (patch)
tree169665d86e12f2aa2d6df71a856c1893267972d7 /classes
parent9704df97f08cf5895e2f5bcfb33f1a53d10c7704 (diff)
downloadmeta-freescale-74df05a7f0fd698cbbe65b9bf925f186891426ca.tar.gz
remove True option to getVar calls
getVar() has been defaulting to expanding by default for a long time (2016), thus remove the True option from getVar() calls with a regex search and replace. Search & replace made using the following command: sed -e 's|\(d\.getVar \?\)( \?\([^,()]*\), \?True)|\1(\2)|g' \ -i $(git grep -E 'getVar ?\( ?([^,()]*), ?True\)' \ | cut -d':' -f1 \ | sort -u) Signed-off-by: André Draszik <andre.draszik@jci.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/fsl-dynamic-packagearch.bbclass28
-rw-r--r--classes/fsl-eula-unpack.bbclass8
-rw-r--r--classes/machine-overrides-extender.bbclass6
-rw-r--r--classes/qoriq_build_64bit_kernel.bbclass2
4 files changed, 22 insertions, 22 deletions
diff --git a/classes/fsl-dynamic-packagearch.bbclass b/classes/fsl-dynamic-packagearch.bbclass
index a7cc53fc..9fcf37be 100644
--- a/classes/fsl-dynamic-packagearch.bbclass
+++ b/classes/fsl-dynamic-packagearch.bbclass
@@ -26,22 +26,22 @@
26# Copyright 2013-2016 (C) O.S. Systems Software LTDA. 26# Copyright 2013-2016 (C) O.S. Systems Software LTDA.
27 27
28python __anonymous () { 28python __anonymous () {
29 machine_arch_filter = set((d.getVar("MACHINE_ARCH_FILTER", True) or "").split()) 29 machine_arch_filter = set((d.getVar("MACHINE_ARCH_FILTER") or "").split())
30 machine_socarch_filter = set((d.getVar("MACHINE_SOCARCH_FILTER", True) or "").split()) 30 machine_socarch_filter = set((d.getVar("MACHINE_SOCARCH_FILTER") or "").split())
31 if machine_socarch_filter or machine_arch_filter: 31 if machine_socarch_filter or machine_arch_filter:
32 provides = set((d.getVar("PROVIDES", True) or "").split()) 32 provides = set((d.getVar("PROVIDES") or "").split())
33 depends = set((d.getVar("DEPENDS", True) or "").split()) 33 depends = set((d.getVar("DEPENDS") or "").split())
34 PN = d.getVar("PN", True) 34 PN = d.getVar("PN")
35 35
36 package_arch = None 36 package_arch = None
37 if list(machine_arch_filter & (provides | depends)): 37 if list(machine_arch_filter & (provides | depends)):
38 package_arch = d.getVar("MACHINE_ARCH", True) 38 package_arch = d.getVar("MACHINE_ARCH")
39 elif list(machine_socarch_filter & (provides | depends)): 39 elif list(machine_socarch_filter & (provides | depends)):
40 package_arch = d.getVar("MACHINE_SOCARCH", True) 40 package_arch = d.getVar("MACHINE_SOCARCH")
41 if not package_arch: 41 if not package_arch:
42 raise bb.parse.SkipPackage("You must set MACHINE_SOCARCH as MACHINE_SOCARCH_FILTER is set for this SoC.") 42 raise bb.parse.SkipPackage("You must set MACHINE_SOCARCH as MACHINE_SOCARCH_FILTER is set for this SoC.")
43 43
44 machine_socarch_suffix = d.getVar("MACHINE_SOCARCH_SUFFIX", True) 44 machine_socarch_suffix = d.getVar("MACHINE_SOCARCH_SUFFIX")
45 if not machine_socarch_suffix: 45 if not machine_socarch_suffix:
46 raise bb.parse.SkipPackage("You must set MACHINE_SOCARCH_SUFFIX as MACHINE_SOCARCH_FILTER is set for this SoC.") 46 raise bb.parse.SkipPackage("You must set MACHINE_SOCARCH_SUFFIX as MACHINE_SOCARCH_FILTER is set for this SoC.")
47 47
@@ -49,18 +49,18 @@ python __anonymous () {
49 bb.debug(1, "Use '%s' as package architecture for '%s'" % (package_arch, PN)) 49 bb.debug(1, "Use '%s' as package architecture for '%s'" % (package_arch, PN))
50 d.setVar("PACKAGE_ARCH", package_arch) 50 d.setVar("PACKAGE_ARCH", package_arch)
51 51
52 cur_package_archs = (d.getVar("PACKAGE_ARCHS", True) or "").split() 52 cur_package_archs = (d.getVar("PACKAGE_ARCHS") or "").split()
53 machine_socarch = (d.getVar("MACHINE_SOCARCH", True) or "") 53 machine_socarch = (d.getVar("MACHINE_SOCARCH") or "")
54 if not machine_socarch in cur_package_archs: 54 if not machine_socarch in cur_package_archs:
55 d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % machine_socarch) 55 d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % machine_socarch)
56 56
57 if d.getVar("TUNE_ARCH", True) == "arm": 57 if d.getVar("TUNE_ARCH") == "arm":
58 # For ARM we have two possible machine_socarch values, one for the arm and one for the thumb instruction set 58 # For ARM we have two possible machine_socarch values, one for the arm and one for the thumb instruction set
59 # add the other value to extra archs also, so that a image recipe searches both for packages. 59 # add the other value to extra archs also, so that a image recipe searches both for packages.
60 if d.getVar("ARM_INSTRUCTION_SET", True) == "thumb": 60 if d.getVar("ARM_INSTRUCTION_SET") == "thumb":
61 d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % d.getVar("ARM_EXTRA_SOCARCH", True)) 61 d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % d.getVar("ARM_EXTRA_SOCARCH"))
62 else: 62 else:
63 d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % d.getVar("THUMB_EXTRA_SOCARCH", True)) 63 d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % d.getVar("THUMB_EXTRA_SOCARCH"))
64} 64}
65 65
66MACHINE_SOCARCH = "${TUNE_PKGARCH}${MACHINE_SOCARCH_SUFFIX}" 66MACHINE_SOCARCH = "${TUNE_PKGARCH}${MACHINE_SOCARCH_SUFFIX}"
diff --git a/classes/fsl-eula-unpack.bbclass b/classes/fsl-eula-unpack.bbclass
index 198a1944..03f576e5 100644
--- a/classes/fsl-eula-unpack.bbclass
+++ b/classes/fsl-eula-unpack.bbclass
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM_append = " file://${FSL_EULA_FILE};md5=ab61cab9599935bfe9f70040
11LIC_FILES_CHKSUM[vardepsexclude] += "FSL_EULA_FILE" 11LIC_FILES_CHKSUM[vardepsexclude] += "FSL_EULA_FILE"
12 12
13python fsl_bin_do_unpack() { 13python fsl_bin_do_unpack() {
14 src_uri = (d.getVar('SRC_URI', True) or "").split() 14 src_uri = (d.getVar('SRC_URI') or "").split()
15 if len(src_uri) == 0: 15 if len(src_uri) == 0:
16 return 16 return
17 17
@@ -44,9 +44,9 @@ python fsl_bin_do_unpack() {
44} 44}
45 45
46python do_unpack() { 46python do_unpack() {
47 eula = d.getVar('ACCEPT_FSL_EULA', True) 47 eula = d.getVar('ACCEPT_FSL_EULA')
48 eula_file = d.getVar('FSL_EULA_FILE', True) 48 eula_file = d.getVar('FSL_EULA_FILE')
49 pkg = d.getVar('PN', True) 49 pkg = d.getVar('PN')
50 if eula == None: 50 if eula == None:
51 bb.fatal("To use '%s' you need to accept the Freescale EULA at '%s'. " 51 bb.fatal("To use '%s' you need to accept the Freescale EULA at '%s'. "
52 "Please read it and in case you accept it, write: " 52 "Please read it and in case you accept it, write: "
diff --git a/classes/machine-overrides-extender.bbclass b/classes/machine-overrides-extender.bbclass
index 959fdc16..4b7d66d5 100644
--- a/classes/machine-overrides-extender.bbclass
+++ b/classes/machine-overrides-extender.bbclass
@@ -15,18 +15,18 @@
15# Copyright 2016-2018 (C) O.S. Systems Software LTDA. 15# Copyright 2016-2018 (C) O.S. Systems Software LTDA.
16 16
17def machine_overrides_extender(d): 17def machine_overrides_extender(d):
18 machine_overrides = (d.getVar('PRISTINE_MACHINEOVERRIDES', True) or '').split(':') 18 machine_overrides = (d.getVar('PRISTINE_MACHINEOVERRIDES') or '').split(':')
19 19
20 # Gather the list of overrides to filter out 20 # Gather the list of overrides to filter out
21 machine_overrides_filter_out = [] 21 machine_overrides_filter_out = []
22 for override in machine_overrides: 22 for override in machine_overrides:
23 machine_overrides_filter_out += (d.getVar('MACHINEOVERRIDES_EXTENDER_FILTER_OUT_%s' % override, True) or '').split() 23 machine_overrides_filter_out += (d.getVar('MACHINEOVERRIDES_EXTENDER_FILTER_OUT_%s' % override) or '').split()
24 24
25 # Drop any overrides of filter_out prior extending 25 # Drop any overrides of filter_out prior extending
26 machine_overrides = [o for o in machine_overrides if o not in machine_overrides_filter_out] 26 machine_overrides = [o for o in machine_overrides if o not in machine_overrides_filter_out]
27 27
28 for override in machine_overrides: 28 for override in machine_overrides:
29 extender = d.getVar('MACHINEOVERRIDES_EXTENDER_%s' % override, True) 29 extender = d.getVar('MACHINEOVERRIDES_EXTENDER_%s' % override)
30 30
31 if extender: 31 if extender:
32 extender = extender.split(':') 32 extender = extender.split(':')
diff --git a/classes/qoriq_build_64bit_kernel.bbclass b/classes/qoriq_build_64bit_kernel.bbclass
index 2209e339..ffa67c8c 100644
--- a/classes/qoriq_build_64bit_kernel.bbclass
+++ b/classes/qoriq_build_64bit_kernel.bbclass
@@ -12,7 +12,7 @@ python () {
12 d.setVar('KERNEL_LD', d.getVar('CCACHE', False) + sys_multilib + '-' + 'ld.bfd' + d.getVar('HOST_LD_KERNEL_ARCH', False) + tc_options) 12 d.setVar('KERNEL_LD', d.getVar('CCACHE', False) + sys_multilib + '-' + 'ld.bfd' + d.getVar('HOST_LD_KERNEL_ARCH', False) + tc_options)
13 d.setVar('KERNEL_AR', d.getVar('CCACHE', False) + sys_multilib + '-' + 'ar' + d.getVar('HOST_AR_KERNEL_ARCH', False)) 13 d.setVar('KERNEL_AR', d.getVar('CCACHE', False) + sys_multilib + '-' + 'ar' + d.getVar('HOST_AR_KERNEL_ARCH', False))
14 14
15 error_qa = d.getVar('ERROR_QA', True) 15 error_qa = d.getVar('ERROR_QA')
16 if 'arch' in error_qa: 16 if 'arch' in error_qa:
17 d.setVar('ERROR_QA', error_qa.replace(' arch', '')) 17 d.setVar('ERROR_QA', error_qa.replace(' arch', ''))
18} 18}