diff options
author | Joshua Lock <joshua.g.lock@intel.com> | 2016-12-14 21:13:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-16 10:23:23 +0000 |
commit | c4e2c59088765d1f1de7ec57cde91980f887c2ff (patch) | |
tree | a2fda8ac5916fb59a711e9220c2177008cca9347 /meta/classes/populate_sdk_base.bbclass | |
parent | d5e67725ac11e3296cad104470931ffa16824b90 (diff) | |
download | poky-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/populate_sdk_base.bbclass')
-rw-r--r-- | meta/classes/populate_sdk_base.bbclass | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index 220cde6925..48bc3959f5 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass | |||
@@ -11,7 +11,7 @@ COMPLEMENTARY_GLOB[ptest-pkgs] = '*-ptest' | |||
11 | def complementary_globs(featurevar, d): | 11 | def complementary_globs(featurevar, d): |
12 | all_globs = d.getVarFlags('COMPLEMENTARY_GLOB') | 12 | all_globs = d.getVarFlags('COMPLEMENTARY_GLOB') |
13 | globs = [] | 13 | globs = [] |
14 | features = set((d.getVar(featurevar, True) or '').split()) | 14 | features = set((d.getVar(featurevar) or '').split()) |
15 | for name, glob in all_globs.items(): | 15 | for name, glob in all_globs.items(): |
16 | if name in features: | 16 | if name in features: |
17 | globs.append(glob) | 17 | globs.append(glob) |
@@ -57,30 +57,30 @@ SDK_PRE_INSTALL_COMMAND ?= "" | |||
57 | SDK_POST_INSTALL_COMMAND ?= "" | 57 | SDK_POST_INSTALL_COMMAND ?= "" |
58 | SDK_RELOCATE_AFTER_INSTALL ?= "1" | 58 | SDK_RELOCATE_AFTER_INSTALL ?= "1" |
59 | 59 | ||
60 | SDKEXTPATH ?= "~/${@d.getVar('DISTRO', True)}_sdk" | 60 | SDKEXTPATH ?= "~/${@d.getVar('DISTRO')}_sdk" |
61 | SDK_TITLE ?= "${@d.getVar('DISTRO_NAME', True) or d.getVar('DISTRO', True)} SDK" | 61 | SDK_TITLE ?= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" |
62 | 62 | ||
63 | SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" | 63 | SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" |
64 | SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" | 64 | SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" |
65 | python write_target_sdk_manifest () { | 65 | python write_target_sdk_manifest () { |
66 | from oe.sdk import sdk_list_installed_packages | 66 | from oe.sdk import sdk_list_installed_packages |
67 | from oe.utils import format_pkg_list | 67 | from oe.utils import format_pkg_list |
68 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST", True)) | 68 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST")) |
69 | pkgs = sdk_list_installed_packages(d, True) | 69 | pkgs = sdk_list_installed_packages(d, True) |
70 | if not os.path.exists(sdkmanifestdir): | 70 | if not os.path.exists(sdkmanifestdir): |
71 | bb.utils.mkdirhier(sdkmanifestdir) | 71 | bb.utils.mkdirhier(sdkmanifestdir) |
72 | with open(d.getVar('SDK_TARGET_MANIFEST', True), 'w') as output: | 72 | with open(d.getVar('SDK_TARGET_MANIFEST'), 'w') as output: |
73 | output.write(format_pkg_list(pkgs, 'ver')) | 73 | output.write(format_pkg_list(pkgs, 'ver')) |
74 | } | 74 | } |
75 | 75 | ||
76 | python write_host_sdk_manifest () { | 76 | python write_host_sdk_manifest () { |
77 | from oe.sdk import sdk_list_installed_packages | 77 | from oe.sdk import sdk_list_installed_packages |
78 | from oe.utils import format_pkg_list | 78 | from oe.utils import format_pkg_list |
79 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST", True)) | 79 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST")) |
80 | pkgs = sdk_list_installed_packages(d, False) | 80 | pkgs = sdk_list_installed_packages(d, False) |
81 | if not os.path.exists(sdkmanifestdir): | 81 | if not os.path.exists(sdkmanifestdir): |
82 | bb.utils.mkdirhier(sdkmanifestdir) | 82 | bb.utils.mkdirhier(sdkmanifestdir) |
83 | with open(d.getVar('SDK_HOST_MANIFEST', True), 'w') as output: | 83 | with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output: |
84 | output.write(format_pkg_list(pkgs, 'ver')) | 84 | output.write(format_pkg_list(pkgs, 'ver')) |
85 | } | 85 | } |
86 | 86 | ||
@@ -93,7 +93,7 @@ def populate_sdk_common(d): | |||
93 | from oe.sdk import populate_sdk | 93 | from oe.sdk import populate_sdk |
94 | from oe.manifest import create_manifest, Manifest | 94 | from oe.manifest import create_manifest, Manifest |
95 | 95 | ||
96 | pn = d.getVar('PN', True) | 96 | pn = d.getVar('PN') |
97 | runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d) | 97 | runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d) |
98 | runtime_mapping_rename("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY", pn, d) | 98 | runtime_mapping_rename("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY", pn, d) |
99 | 99 | ||
@@ -101,13 +101,13 @@ def populate_sdk_common(d): | |||
101 | ld.setVar("PKGDATA_DIR", "${STAGING_DIR}/${SDK_ARCH}-${SDKPKGSUFFIX}${SDK_VENDOR}-${SDK_OS}/pkgdata") | 101 | ld.setVar("PKGDATA_DIR", "${STAGING_DIR}/${SDK_ARCH}-${SDKPKGSUFFIX}${SDK_VENDOR}-${SDK_OS}/pkgdata") |
102 | runtime_mapping_rename("TOOLCHAIN_HOST_TASK", pn, ld) | 102 | runtime_mapping_rename("TOOLCHAIN_HOST_TASK", pn, ld) |
103 | runtime_mapping_rename("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", pn, ld) | 103 | runtime_mapping_rename("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", pn, ld) |
104 | d.setVar("TOOLCHAIN_HOST_TASK", ld.getVar("TOOLCHAIN_HOST_TASK", True)) | 104 | d.setVar("TOOLCHAIN_HOST_TASK", ld.getVar("TOOLCHAIN_HOST_TASK")) |
105 | d.setVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", ld.getVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", True)) | 105 | d.setVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", ld.getVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY")) |
106 | 106 | ||
107 | # create target/host SDK manifests | 107 | # create target/host SDK manifests |
108 | create_manifest(d, manifest_dir=d.getVar('SDK_DIR', True), | 108 | create_manifest(d, manifest_dir=d.getVar('SDK_DIR'), |
109 | manifest_type=Manifest.MANIFEST_TYPE_SDK_HOST) | 109 | manifest_type=Manifest.MANIFEST_TYPE_SDK_HOST) |
110 | create_manifest(d, manifest_dir=d.getVar('SDK_DIR', True), | 110 | create_manifest(d, manifest_dir=d.getVar('SDK_DIR'), |
111 | manifest_type=Manifest.MANIFEST_TYPE_SDK_TARGET) | 111 | manifest_type=Manifest.MANIFEST_TYPE_SDK_TARGET) |
112 | 112 | ||
113 | populate_sdk(d) | 113 | populate_sdk(d) |
@@ -134,7 +134,7 @@ fakeroot create_sdk_files() { | |||
134 | python check_sdk_sysroots() { | 134 | python check_sdk_sysroots() { |
135 | # Fails build if there are broken or dangling symlinks in SDK sysroots | 135 | # Fails build if there are broken or dangling symlinks in SDK sysroots |
136 | 136 | ||
137 | if d.getVar('CHECK_SDK_SYSROOTS', True) != '1': | 137 | if d.getVar('CHECK_SDK_SYSROOTS') != '1': |
138 | # disabled, bail out | 138 | # disabled, bail out |
139 | return | 139 | return |
140 | 140 | ||
@@ -142,8 +142,8 @@ python check_sdk_sysroots() { | |||
142 | return os.path.abspath(path) | 142 | return os.path.abspath(path) |
143 | 143 | ||
144 | # Get scan root | 144 | # Get scan root |
145 | SCAN_ROOT = norm_path("%s/%s/sysroots/" % (d.getVar('SDK_OUTPUT', True), | 145 | SCAN_ROOT = norm_path("%s/%s/sysroots/" % (d.getVar('SDK_OUTPUT'), |
146 | d.getVar('SDKPATH', True))) | 146 | d.getVar('SDKPATH'))) |
147 | 147 | ||
148 | bb.note('Checking SDK sysroots at ' + SCAN_ROOT) | 148 | bb.note('Checking SDK sysroots at ' + SCAN_ROOT) |
149 | 149 | ||
@@ -218,7 +218,7 @@ EOF | |||
218 | -e 's#@SDKEXTPATH@#${SDKEXTPATH}#g' \ | 218 | -e 's#@SDKEXTPATH@#${SDKEXTPATH}#g' \ |
219 | -e 's#@OLDEST_KERNEL@#${SDK_OLDEST_KERNEL}#g' \ | 219 | -e 's#@OLDEST_KERNEL@#${SDK_OLDEST_KERNEL}#g' \ |
220 | -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \ | 220 | -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \ |
221 | -e 's#@SDK_TITLE@#${@d.getVar("SDK_TITLE", True).replace('&', '\&')}#g' \ | 221 | -e 's#@SDK_TITLE@#${@d.getVar("SDK_TITLE").replace('&', '\&')}#g' \ |
222 | -e 's#@SDK_VERSION@#${SDK_VERSION}#g' \ | 222 | -e 's#@SDK_VERSION@#${SDK_VERSION}#g' \ |
223 | -e '/@SDK_PRE_INSTALL_COMMAND@/d' \ | 223 | -e '/@SDK_PRE_INSTALL_COMMAND@/d' \ |
224 | -e '/@SDK_POST_INSTALL_COMMAND@/d' \ | 224 | -e '/@SDK_POST_INSTALL_COMMAND@/d' \ |
@@ -268,7 +268,7 @@ do_populate_sdk[file-checksums] += "${COREBASE}/meta/files/toolchain-shar-reloca | |||
268 | ${COREBASE}/meta/files/toolchain-shar-extract.sh:True" | 268 | ${COREBASE}/meta/files/toolchain-shar-extract.sh:True" |
269 | 269 | ||
270 | do_populate_sdk[dirs] = "${PKGDATA_DIR} ${TOPDIR}" | 270 | do_populate_sdk[dirs] = "${PKGDATA_DIR} ${TOPDIR}" |
271 | do_populate_sdk[depends] += "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_DEPENDS', True).split()])} ${@d.getVarFlag('do_rootfs', 'depends', False)}" | 271 | do_populate_sdk[depends] += "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_DEPENDS').split()])} ${@d.getVarFlag('do_rootfs', 'depends', False)}" |
272 | do_populate_sdk[rdepends] = "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_RDEPENDS', True).split()])}" | 272 | do_populate_sdk[rdepends] = "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_RDEPENDS').split()])}" |
273 | do_populate_sdk[recrdeptask] += "do_packagedata do_package_write_rpm do_package_write_ipk do_package_write_deb" | 273 | do_populate_sdk[recrdeptask] += "do_packagedata do_package_write_rpm do_package_write_ipk do_package_write_deb" |
274 | addtask populate_sdk | 274 | addtask populate_sdk |