summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-03 17:59:03 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-06 13:13:01 +0000
commit5b7c822609a42e58e96a004071978c9ff196e955 (patch)
treeb3a80c165e7d7bda80eb0ff4c04a37caf7b11af6 /meta/classes
parent78955b837cde12a3f12cd0ee096c8e936732169e (diff)
downloadast2050-yocto-poky-5b7c822609a42e58e96a004071978c9ff196e955.zip
ast2050-yocto-poky-5b7c822609a42e58e96a004071978c9ff196e955.tar.gz
package.bbclass: Pre-expand some variables to save time
(From OE-Core rev: fc5bff0145d8f5db1c09be61f5de209ac4016ed1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package.bbclass14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 7c79c69..e5d444b 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)
###########################################################################
OpenPOWER on IntegriCloud