diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-29 14:10:30 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-01 15:51:29 +0000 |
commit | 5c7c8347eb1bc25d194be6f4be142ba0924e2600 (patch) | |
tree | 67d419e2b248989129085523f1baad73cecdccb6 /meta/classes/buildhistory.bbclass | |
parent | ca2ee871f82dd0ba4122a8373e4efd21cec5722b (diff) | |
download | openembedded-core-5c7c8347eb1bc25d194be6f4be142ba0924e2600.tar.gz openembedded-core-5c7c8347eb1bc25d194be6f4be142ba0924e2600.tar.bz2 openembedded-core-5c7c8347eb1bc25d194be6f4be142ba0924e2600.zip |
package: Create global package file list and use throughout PACKAGEFUNCS
Currently we do a signficant amount of tree traversal in many different places
which in inefficient. We can assume that the files don't change and cache the
file list which gives an efficiency improvement which this patch does using
a global variable.
(From OE-Core rev: 2d7608842d2dab07065e60aab729a5c8fd6b7907)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 4b80f07b45..a6fbd68333 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -199,12 +199,11 @@ python buildhistory_emit_pkghistory() { pkgdestpkg = os.path.join(pkgdest, pkg) filelist = [] pkginfo.size = 0 - for root, dirs, files in os.walk(pkgdestpkg): - relpth = os.path.relpath(root, pkgdestpkg) - for f in files: - fstat = os.lstat(os.path.join(root, f)) - pkginfo.size += fstat.st_size - filelist.append(os.sep + os.path.join(relpth, f)) + for f in pkgfiles[pkg]: + relpth = os.path.relpath(f, pkgdestpkg) + fstat = os.lstat(f) + pkginfo.size += fstat.st_size + filelist.append(os.sep + relpth) filelist.sort() pkginfo.filelist = " ".join(filelist) |