mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
package.bbclass: Pre-expand some variables to save time
(From OE-Core rev: fc5bff0145d8f5db1c09be61f5de209ac4016ed1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -1802,6 +1802,20 @@ python do_package () {
|
|||||||
bb.error("WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package")
|
bb.error("WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package")
|
||||||
return
|
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)
|
# Setup PKGD (from D)
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user