icecc: Remove several getVar() expand arguments
PATCH 1/1 icecc: Remove several getVar() expand arguments
Several of the calls to getVar() were either superfluously passing True for the expand argument, or were wrongly passing False
--- meta/classes/icecc.bbclass | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-)
meta/classes/icecc.bbclass +13 -14
@@ -58,7 +58,7 @@ def icecc_dep_prepend(d): # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not # we need that built is the responsibility of the patch function / class, not # the application. - if not d.getVar('INHIBIT_DEFAULT_DEPS', False): + if not d.getVar('INHIBIT_DEFAULT_DEPS'): return "icecc-create-env-native" return ""
@@ -66,21 +66,20 @@ DEPENDS_prepend += "${@icecc_dep_prepend(d)} " get_cross_kernel_cc[vardepsexclude] += "KERNEL_CC" def get_cross_kernel_cc(bb,d): - kernel_cc = d.getVar('KERNEL_CC', False) + kernel_cc = d.getVar('KERNEL_CC') # evaluate the expression by the shell if necessary if '`' in kernel_cc or '$(' in kernel_cc: import subprocess kernel_cc = subprocess.check_output("echo %s" % kernel_cc, shell=True).decode("utf-8")[:-1] - kernel_cc = d.expand(kernel_cc) kernel_cc = kernel_cc.replace('ccache', '').strip() kernel_cc = kernel_cc.split(' ')[0] kernel_cc = kernel_cc.strip() return kernel_cc def get_icecc(d): - return d.getVar('ICECC_PATH', False) or bb.utils.which(os.getenv("PATH"), "icecc") + return d.getVar('ICECC_PATH') or bb.utils.which(os.getenv("PATH"), "icecc") def create_path(compilers, bb, d): """
@@ -115,7 +114,7 @@ def create_path(compilers, bb, d): return staging def use_icecc(bb,d): - if d.getVar('ICECC_DISABLED', False) == "1": + if d.getVar('ICECC_DISABLED') == "1": # don't even try it, when explicitly disabled return "no"
@@ -129,7 +128,7 @@ def use_icecc(bb,d): pn = d.getVar('PN') system_class_blacklist = [] - user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL', False) or "none").split() + user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split() package_class_blacklist = system_class_blacklist + user_class_blacklist for black in package_class_blacklist:
@@ -146,8 +145,8 @@ def use_icecc(bb,d): # e.g. when there is new version # building libgcc-initial with icecc fails with CPP sanity check error if host sysroot contains cross gcc built for another target tune/variant system_package_blacklist = ["libgcc-initial"] - user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL', False) or "").split() - user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL', False) or "").split() + user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL') or "").split() + user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL') or "").split() package_blacklist = system_package_blacklist + user_package_blacklist if pn in package_blacklist:
@@ -158,7 +157,7 @@ def use_icecc(bb,d): bb.debug(1, "%s: found in whitelist, enable icecc" % pn) return "yes" - if d.getVar('PARALLEL_MAKE', False) == "": + if d.getVar('PARALLEL_MAKE') == "": bb.debug(1, "%s: has empty PARALLEL_MAKE, disable icecc" % pn) return "no"
@@ -188,13 +187,13 @@ def icecc_version(bb, d): if use_icecc(bb, d) == "no": return "" - parallel = d.getVar('ICECC_PARALLEL_MAKE', False) or "" - if not d.getVar('PARALLEL_MAKE', False) == "" and parallel: + parallel = d.getVar('ICECC_PARALLEL_MAKE') or "" + if not d.getVar('PARALLEL_MAKE') == "" and parallel: d.setVar("PARALLEL_MAKE", parallel) # Disable showing the caret in the GCC compiler output if the workaround is # disabled - if d.getVar('ICECC_CARET_WORKAROUND', True) == '0': + if d.getVar('ICECC_CARET_WORKAROUND') == '0': d.setVar('ICECC_CFLAGS', '-fno-diagnostics-show-caret') if icecc_is_native(bb, d):
@@ -205,7 +204,7 @@ def icecc_version(bb, d): prefix = d.expand('${HOST_PREFIX}' ) distro = d.expand('${DISTRO}') target_sys = d.expand('${TARGET_SYS}') - float = d.getVar('TARGET_FPU', False) or "hard" + float = d.getVar('TARGET_FPU') or "hard" archive_name = prefix + distro + "-" + target_sys + "-" + float if icecc_is_kernel(bb, d): archive_name += "-kernel"
@@ -214,7 +213,7 @@ def icecc_version(bb, d): ice_dir = icecc_dir(bb, d) tar_file = os.path.join(ice_dir, "{archive}-{version}-@VERSION@-{hostname}.tar.gz".format( archive=archive_name, - version=d.getVar('ICECC_ENV_VERSION', True), + version=d.getVar('ICECC_ENV_VERSION'), hostname=socket.gethostname() ))
Signature · 1 line
2.14.3
✗ patchtest: failure for icecc: Remove several getVar() expand arguments
== Series Details ==
Series: icecc: Remove several getVar() expand arguments
Revision: 1
URL : https://patchwork.openembedded.org/series/11060/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 6e5dbb53a7)
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe