diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-29 13:51:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-01 15:54:01 +0000 |
commit | 8a0b4578ecf4403f8551e159cc59de4088c3a0af (patch) | |
tree | 5b38c812b4e925dbe7e0974e4046811c572904b9 /meta/classes/package.bbclass | |
parent | b0a2f55ccc8f9850e7de5bb9a1683abbe6fd2b43 (diff) | |
download | poky-8a0b4578ecf4403f8551e159cc59de4088c3a0af.tar.gz |
package.bbclass: Avoid copying the datastore for FILES handling
There is no real point in adjusting overrides and creating a copy of the datastore,
just to access a single variable. We can do this just as easily with a slightly
more complicated getVar call. This improves performance.
(From OE-Core rev: 69f4351809359a0c7c38e8f233f3e3f7680ed2e2)
(From OE-Core rev: b5d65f5d5e5b26d3a2c673e899114c90bcaf6bc8)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 51ab009d88..4e7db9af25 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -949,18 +949,10 @@ python populate_packages () { | |||
949 | seen = [] | 949 | seen = [] |
950 | 950 | ||
951 | for pkg in package_list: | 951 | for pkg in package_list: |
952 | localdata = bb.data.createCopy(d) | ||
953 | root = os.path.join(pkgdest, pkg) | 952 | root = os.path.join(pkgdest, pkg) |
954 | bb.mkdirhier(root) | 953 | bb.mkdirhier(root) |
955 | 954 | ||
956 | localdata.setVar('PKG', pkg) | 955 | filesvar = d.getVar('FILES_%s' % pkg, True) or d.getVar('FILES', True) or "" |
957 | overrides = localdata.getVar('OVERRIDES', True) | ||
958 | if not overrides: | ||
959 | raise bb.build.FuncFailed('OVERRIDES not defined') | ||
960 | localdata.setVar('OVERRIDES', overrides + ':' + pkg) | ||
961 | bb.data.update_data(localdata) | ||
962 | |||
963 | filesvar = localdata.getVar('FILES', True) or "" | ||
964 | if "//" in filesvar: | 956 | if "//" in filesvar: |
965 | bb.warn("FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg) | 957 | bb.warn("FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg) |
966 | filesvar.replace("//", "/") | 958 | filesvar.replace("//", "/") |
@@ -1023,7 +1015,6 @@ python populate_packages () { | |||
1023 | if ret is False or ret == 0: | 1015 | if ret is False or ret == 0: |
1024 | raise bb.build.FuncFailed("File population failed") | 1016 | raise bb.build.FuncFailed("File population failed") |
1025 | 1017 | ||
1026 | del localdata | ||
1027 | os.chdir(workdir) | 1018 | os.chdir(workdir) |
1028 | 1019 | ||
1029 | unshipped = [] | 1020 | unshipped = [] |