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:13:01 +0000 |
commit | 5b7c822609a42e58e96a004071978c9ff196e955 (patch) | |
tree | b3a80c165e7d7bda80eb0ff4c04a37caf7b11af6 | |
parent | 78955b837cde12a3f12cd0ee096c8e936732169e (diff) | |
download | 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>
-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 () { | |||
1803 | return | 1803 | return |
1804 | 1804 | ||
1805 | ########################################################################### | 1805 | ########################################################################### |
1806 | # Optimisations | ||
1807 | ########################################################################### | ||
1808 | |||
1809 | # Contunually rexpanding complex expressions is inefficient, particularly when | ||
1810 | # we write to the datastore and invalidate the expansion cache. This code | ||
1811 | # pre-expands some frequently used variables | ||
1812 | |||
1813 | def expandVar(x, d): | ||
1814 | d.setVar(x, d.getVar(x, True)) | ||
1815 | |||
1816 | for x in 'PN', 'PV', 'BPN', 'TARGET_SYS', 'EXTENDPRAUTO': | ||
1817 | expandVar(x, d) | ||
1818 | |||
1819 | ########################################################################### | ||
1806 | # Setup PKGD (from D) | 1820 | # Setup PKGD (from D) |
1807 | ########################################################################### | 1821 | ########################################################################### |
1808 | 1822 | ||