toaster.bbclass: Correct parsing of installed-package-sizes.txt

The recent change in buildhistory.bbclass to use a tab in
installed-package-sizes.txt between "KiB" and the package name caused
toaster_buildhistory_dump() to fail since it parses the file and
expected a space there.

(From OE-Core rev: 7b3692f57628b33840f6dbcddbe05ae56c24b98e)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Peter Kjellerstedt 2017-03-11 06:26:54 +01:00 committed by Richard Purdie
parent 5c9dc408aa
commit 12cc4f550a
1 changed files with 1 additions and 2 deletions

View File

@ -265,8 +265,7 @@ python toaster_buildhistory_dump() {
with open("%s/installed-package-sizes.txt" % installed_img_path, "r") as fin:
for line in fin:
line = line.rstrip(";")
psize, px = line.split("\t")
punit, pname = px.split(" ")
psize, punit, pname = line.split()
# this size is "installed-size" as it measures how much space it takes on disk
images[target][pname.strip()] = {'size':int(psize)*1024, 'depends' : []}