summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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)
###########################################################################