diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-12-02 18:50:50 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-12-03 12:44:48 +0000 |
commit | 540a2a30be21c3eca4323efbe91e7dcfc31a4c97 (patch) | |
tree | c3dfb6b94116165444d844a5ce65bd22a76bf794 | |
parent | cd7f7efcd5f297d876823b8f579ecefb9542b089 (diff) | |
download | openembedded-core-540a2a30be21c3eca4323efbe91e7dcfc31a4c97.tar.gz openembedded-core-540a2a30be21c3eca4323efbe91e7dcfc31a4c97.tar.bz2 openembedded-core-540a2a30be21c3eca4323efbe91e7dcfc31a4c97.zip |
classes/buildhistory: reduce parsing time
Disable several python functions if not parsing within the worker
context. This avoids executing expensive operations while parsing
recipes (which is unnecessary).
(Thanks to Richard Purdie for pointing out the issue and suggesting the
workaround.)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/buildhistory.bbclass | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index b11e9bab5c..e46b124bbb 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -448,6 +448,8 @@ POPULATE_SDK_POST_HOST_COMMAND_append = "buildhistory_get_sdk_installed host ; " SDK_POSTPROCESS_COMMAND += "buildhistory_get_sdkinfo ; " def buildhistory_get_layers(d): + if d.getVar('BB_WORKERCONTEXT', True) != '1': + return "" layertext = "Configured metadata layers:\n%s\n" % '\n'.join(get_layers_branch_rev(d)) return layertext @@ -478,11 +480,15 @@ def outputvars(vars, listvars, d): return ret.rstrip('\n') def buildhistory_get_imagevars(d): + if d.getVar('BB_WORKERCONTEXT', True) != '1': + return "" imagevars = "DISTRO DISTRO_VERSION USER_CLASSES IMAGE_CLASSES IMAGE_FEATURES IMAGE_LINGUAS IMAGE_INSTALL BAD_RECOMMENDATIONS NO_RECOMMENDATIONS PACKAGE_EXCLUDE ROOTFS_POSTPROCESS_COMMAND IMAGE_POSTPROCESS_COMMAND" listvars = "USER_CLASSES IMAGE_CLASSES IMAGE_FEATURES IMAGE_LINGUAS IMAGE_INSTALL BAD_RECOMMENDATIONS PACKAGE_EXCLUDE" return outputvars(imagevars, listvars, d) def buildhistory_get_sdkvars(d): + if d.getVar('BB_WORKERCONTEXT', True) != '1': + return "" sdkvars = "DISTRO DISTRO_VERSION SDK_NAME SDK_VERSION SDKMACHINE SDKIMAGE_FEATURES BAD_RECOMMENDATIONS NO_RECOMMENDATIONS PACKAGE_EXCLUDE" listvars = "SDKIMAGE_FEATURES BAD_RECOMMENDATIONS PACKAGE_EXCLUDE" return outputvars(sdkvars, listvars, d) |