diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-03 17:59:03 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-06 13:12:19 +0000 |
commit | fc5bff0145d8f5db1c09be61f5de209ac4016ed1 (patch) | |
tree | 3a0cfd78565025ea2fca66a2aa3713e77de12d68 | |
parent | b6438c94035a014902ec89af63ff3787cd8c67f6 (diff) | |
download | openembedded-core-fc5bff0145d8f5db1c09be61f5de209ac4016ed1.tar.gz openembedded-core-fc5bff0145d8f5db1c09be61f5de209ac4016ed1.tar.bz2 openembedded-core-fc5bff0145d8f5db1c09be61f5de209ac4016ed1.zip |
package.bbclass: Pre-expand some variables to save time
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/package.bbclass | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 7c79c69287..e5d444b161 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -1803,6 +1803,20 @@ python do_package () { return ########################################################################### + # Optimisations + ########################################################################### + + # Contunually rexpanding complex expressions is inefficient, particularly when + # we write to the datastore and invalidate the expansion cache. This code + # pre-expands some frequently used variables + + def expandVar(x, d): + d.setVar(x, d.getVar(x, True)) + + for x in 'PN', 'PV', 'BPN', 'TARGET_SYS', 'EXTENDPRAUTO': + expandVar(x, d) + + ########################################################################### # Setup PKGD (from D) ########################################################################### |