[oe-commits] Richard Purdie : package.bbclass: Pre-expand some variables to save time
git at git.openembedded.org
git at git.openembedded.org
Sun Feb 3 23:46:36 UTC 2013
Module: openembedded-core.git
Branch: master-next
Commit: e8a6486cef549bb28ccdab376f73699e1597795c
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=e8a6486cef549bb28ccdab376f73699e1597795c
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date: Sun Feb 3 17:59:03 2013 +0000
package.bbclass: Pre-expand some variables to save time
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
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 2c3f173..2bae65b 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1798,6 +1798,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)
###########################################################################
More information about the Openembedded-commits
mailing list