Skip to contentSkip to conversation

toaster.bbclass: strip task from the target

PATCH Superseded Ed Bartosh 1 participant 2 messages Mar 30, 2016 – Apr 6, 2016

lore
Share & tools
lore

Ed Bartosh

author
#0 lore raw

PATCH 1/1 toaster.bbclass: strip task from the target

Current code in toaster_buildhistory_dump assumes that bitbake target doesn't contain task name. It uses target as a part of path to the files with data that it analizes. It fails to find files if target contains task name. Stripping task from the target should solve this.

---
 meta/classes/toaster.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/toaster.bbclass +1 -0
index 1c0703c..5ea6c38 100644
@@ -317,6 +317,7 @@ python toaster_buildhistory_dump() {
     allpkgs = {}
     files = {}
     for target in e._pkgs:
+        target = target.split(':')[0]
         installed_img_path = e.data.expand(os.path.join(BUILDHISTORY_DIR_IMAGE_BASE, target))
         if os.path.exists(installed_img_path):
             images[target] = {}
Signature · 1 line
2.1.4
author
#1 lore raw

PATCH v2 1/1 toaster.bbclass: strip task from the target

Current code in toaster_buildhistory_dump assumes that bitbake target doesn't contain task name. It uses target as a part of path to the files with data that it analizes. It fails to find files if target contains task name. Stripping task from the target should solve this.

---
 meta/classes/toaster.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/toaster.bbclass +1 -0
index 1c0703c..004e068 100644
@@ -317,6 +317,7 @@ python toaster_buildhistory_dump() {
     allpkgs = {}
     files = {}
     for target in e._pkgs:
+        target = target.split(':')[0] # strip ':<task>' suffix from the target
         installed_img_path = e.data.expand(os.path.join(BUILDHISTORY_DIR_IMAGE_BASE, target))
         if os.path.exists(installed_img_path):
             images[target] = {}
Signature · 1 line
2.1.4