diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2019-01-17 15:57:41 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-17 15:57:41 -0200 |
commit | 4d00e1d094571597fcfb686112157577fe49fc17 (patch) | |
tree | 169665d86e12f2aa2d6df71a856c1893267972d7 /classes/fsl-dynamic-packagearch.bbclass | |
parent | 9704df97f08cf5895e2f5bcfb33f1a53d10c7704 (diff) | |
parent | 74df05a7f0fd698cbbe65b9bf925f186891426ca (diff) | |
download | meta-freescale-4d00e1d094571597fcfb686112157577fe49fc17.tar.gz |
Merge pull request #40 from andred/for-merge
remove True option to getVar calls
Diffstat (limited to 'classes/fsl-dynamic-packagearch.bbclass')
-rw-r--r-- | classes/fsl-dynamic-packagearch.bbclass | 28 |
1 files changed, 14 insertions, 14 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 | ||
28 | python __anonymous () { | 28 | python __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 | ||
66 | MACHINE_SOCARCH = "${TUNE_PKGARCH}${MACHINE_SOCARCH_SUFFIX}" | 66 | MACHINE_SOCARCH = "${TUNE_PKGARCH}${MACHINE_SOCARCH_SUFFIX}" |