Allow bitbake commands starting with do_
PATCH 1/1 Allow bitbake commands starting with do_
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
@@ -634,6 +634,10 @@ class RunQueueData: fnid = taskData.build_targets[targetid][0] fn = taskData.fn_index[fnid] + + import re + target[1] = re.sub("^do_", "", target[1]) + self.target_pairs.append((fn, target[1])) if fnid in taskData.failed_fnids:
Signature · 1 line
2.5.1
Quoted 20 lines · Alex Franco
The output of "bitbake, -c listtasks pkg" lists tasks with their real names
(starting with "do_"), but then "bitbake -cdo_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]
Signed-off-by Alex Franco <[email protected]>--- bitbake/lib/bb/runqueue.py | 4 ++++ 1 file changed, 4 insertions(+)bitbake/lib/bb/runqueue.py +0
-0
bitbake/lib/bb/runqueue.py class RunQueueData: · line 642
Quoted 9 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] + + import re + target[1] = re.sub("^do_", "", target[1]) + self.target_pairs.append((fn, target[1]))
You don't need to use a regular expression for this. Also, imports belong at the top of the file anyway.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
I like this version from the 3 you sent today :) See comment below
Quoted 22 lines · Alex Franco
The output of "bitbake, -c listtasks pkg" lists tasks with their real names
(starting with "do_"), but then "bitbake -cdo_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]
Signed-off-by Alex Franco <[email protected]>--- bitbake/lib/bb/runqueue.py | 4 ++++ 1 file changed, 4 insertions(+)bitbake/lib/bb/runqueue.py +0
-0
bitbake/lib/bb/runqueue.py class RunQueueData: · line 637
Quoted 4 lines
bitbake/lib/bb/runqueue.py +1
-0@@ -634,6 +634,10 @@ class RunQueueData: fnid = taskData.build_targets[targetid][0] fn = taskData.fn_index[fnid] +
imports at this point sometimes get messy, would be good if it was at least at the beginning of the function.
Quoted 6 lines
bitbake/lib/bb/runqueue.py +3
-0+ import re + target[1] = re.sub("^do_", "", target[1]) + self.target_pairs.append((fn, target[1])) if fnid in taskData.failed_fnids: