Skip to contentSkip to conversation

Allow bitbake commands starting with do_ v2

PATCH Superseded Alex Franco 3 participants 3 messages Aug 31, 2015

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow bitbake commands starting with do_ v2

The output of "bitbake, -c listtasks pkg" lists tasks with their real names (starting with "do_"), but then "bitbake -c do_task" fails, as "do_" always gets unconditionally prepended to task names. This patch handles this error by always removing "do_" from the beginning of task names when the runqueue is being constructed.

[YOCTO #7818]

---
 bitbake/lib/bb/runqueue.py | 4 ++++
 1 file changed, 4 insertions(+)
bitbake/lib/bb/runqueue.py +4 -0
index 0f99e5a..834992f 100644
@@ -634,6 +634,10 @@ class RunQueueData:
 
             fnid = taskData.build_targets[targetid][0]
             fn = taskData.fn_index[fnid]
+
+            if target[1].startswith("do_"):
+                target[1] = target[1].replace("do_", "", 1)
+
             self.target_pairs.append((fn, target[1]))
 
             if fnid in taskData.failed_fnids:
Signature · 1 line
2.5.1
#1 lore raw
Quoted 18 lines · Alex Franco

The output of "bitbake, -c listtasks pkg" lists tasks with their real names (starting with "do_"), but then "bitbake -c do_task" fails, as "do_" always gets unconditionally prepended to task names. This patch handles this error by always removing "do_" from the beginning of task names when the runqueue is being constructed.

[YOCTO #7818]

---
 bitbake/lib/bb/runqueue.py | 4 ++++
 1 file changed, 4 insertions(+)
bitbake/lib/bb/runqueue.py +0 -0
index 0f99e5a..834992f 100644

bitbake/lib/bb/runqueue.py class RunQueueData: · line 640

Quoted 7 lines
bitbake/lib/bb/runqueue.py +4 -0
@@ -634,6 +634,10 @@ class RunQueueData:
 
             fnid = taskData.build_targets[targetid][0]
             fn = taskData.fn_index[fnid]
+
+            if target[1].startswith("do_"):
+                target[1] = target[1].replace("do_", "", 1)
+

not sure if it's faster and/or more obvious...

target[1] = target[1][3:]

(since we know the first three characters are 'do_' since we did a 'startswith'...)

--Mark

Quoted 4 lines
bitbake/lib/bb/runqueue.py +0 -0
             self.target_pairs.append((fn, target[1]))
 
             if fnid in taskData.failed_fnids:
#2 lore raw
In reply to Alex Franco
Quoted 7 lines · Alex Franco

The output of "bitbake, -c listtasks pkg" lists tasks with their real names (starting with "do_"), but then "bitbake -c do_task" fails, as "do_" always gets unconditionally prepended to task names. This patch handles this error by always removing "do_" from the beginning of task names when the runqueue is being constructed.

[YOCTO #7818]

"v2" belongs to [PATCHv2] (set by subject-prefix), you don't want it to be part of final commit message, do you?

Quoted 29 lines
---
 bitbake/lib/bb/runqueue.py | 4 ++++
 1 file changed, 4 insertions(+)
bitbake/lib/bb/runqueue.py +4 -0
index 0f99e5a..834992f 100644
@@ -634,6 +634,10 @@ class RunQueueData:
 
             fnid = taskData.build_targets[targetid][0]
             fn = taskData.fn_index[fnid]
+
+            if target[1].startswith("do_"):
+                target[1] = target[1].replace("do_", "", 1)
+
             self.target_pairs.append((fn, target[1]))
 
             if fnid in taskData.failed_fnids:
Signature · 7 lines
2.5.1

-- 
_______________________________________________
bitbake-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]