summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-12-02 18:50:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-03 17:45:49 +0000
commitf4e91404f8722b4fb1700e4c9fe13f0dfd7ebda3 (patch)
treee7f66b889c78a0e617f5a857f2af537985ce663d /scripts
parent4a75e83b29d6736a17d3a461774adb18b8ff5abf (diff)
downloadpoky-f4e91404f8722b4fb1700e4c9fe13f0dfd7ebda3.tar.gz
classes/package: record PKGSIZE as total file size in pkgdata
We were using "du -sk" to collect the total size of all files in each package for writing out to PKGSIZE in each pkgdata file; however this reports the total space used on disk not the total size of all files, which means it is dependent on the block size and filesystem being used for TMPDIR on the build host. Instead, take the total of the size reported by lstat() for each packaged file, which we are already collecting for FILES_INFO in any case. Note: this changes PKGSIZE to be reported in bytes instead of kilobytes since this is what lstat reports, but this is really what we should be storing anyway so that we have the precision if we need it. Fixes [YOCTO #5334] (From OE-Core rev: 29615b36fca696822a715ece2afbe0bf9a43ed61) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/oe-pkgdata-util6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index 03c8f95305..a373116b2c 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -184,7 +184,11 @@ def read_value(args, usage, debug=False):
184 if qvar == "PKGSIZE": 184 if qvar == "PKGSIZE":
185 # append packagename 185 # append packagename
186 qvar = "%s_%s" % (var, mappedpkg) 186 qvar = "%s_%s" % (var, mappedpkg)
187 print(readvar(revlink, qvar)) 187 # PKGSIZE is now in bytes, but we we want it in KB
188 pkgsize = (int(readvar(revlink, qvar)) + 1024 // 2) // 1024
189 print("%d" % pkgsize)
190 else:
191 print(readvar(revlink, qvar))
188 192
189def lookup_pkg(args, usage, debug=False): 193def lookup_pkg(args, usage, debug=False):
190 if len(args) < 2: 194 if len(args) < 2: