diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-29 13:49:56 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-01 15:51:29 +0000 |
commit | 40542f7a46bfb8431e31eca9af06adb4b343d810 (patch) | |
tree | 3c9cc2aac648de9e86babcb045c74e081b8d76d4 | |
parent | 9509627e06ab4cf18c5bbf3f405ecf19a9f40287 (diff) | |
download | openembedded-core-40542f7a46bfb8431e31eca9af06adb4b343d810.tar.gz openembedded-core-40542f7a46bfb8431e31eca9af06adb4b343d810.tar.bz2 openembedded-core-40542f7a46bfb8431e31eca9af06adb4b343d810.zip |
package.bbclass: Check FILES once, not once per loop iteration
There is no need to check FILES in each loop iteration, we can just check it once
at the start when we read the variable.
(From OE-Core rev: 1bcc5cba12cbb1b846b433719d1b0820f5a97105)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/package.bbclass | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 8b256cf4ce..51ab009d88 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -961,12 +961,12 @@ python populate_packages () { bb.data.update_data(localdata) filesvar = localdata.getVar('FILES', True) or "" + if "//" in filesvar: + bb.warn("FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg) + filesvar.replace("//", "/") files = filesvar.split() file_links = {} for file in files: - if file.find("//") != -1: - bb.warn("FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg) - file.replace("//", "/") if os.path.isabs(file): file = '.' + file if not os.path.islink(file): |