Skip to contentSkip to conversation

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

PATCH New Peter Kjellerstedt 1 participant 1 message Mar 11, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 meta/classes/toaster.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta/classes/toaster.bbclass +1 -2
index a68557882c..4de380bce2 100644
@@ -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' : []}
 
Signature · 1 line
2.12.0