All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cooker: Fix world taskgraph generation issue
@ 2016-12-07 12:31 Richard Purdie
  2016-12-13  1:59 ` Robert Yang
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2016-12-07 12:31 UTC (permalink / raw)
  To: bitbake-devel

The processing of the "do_" prefix to tasks is currently inconsistent
and has resulted in "bitbake world -g" being broken as task prefixes
don't get handled correctly.

Make the "do_" task prefix handling consistent through various codepaths.

[YOCTO #10651]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 bitbake/lib/bb/cooker.py | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 4810fe3..1fe693c 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -657,6 +657,8 @@ class BBCooker:
         # A task of None means use the default task
         if task is None:
             task = self.configuration.cmd
+        if not task.startswith("do_"):
+            task = "do_%s" % task
 
         fulltargetlist = self.checkPackages(pkgs_to_build, task)
         taskdata = {}
@@ -715,6 +717,9 @@ class BBCooker:
         Create a dependency graph of pkgs_to_build including reverse dependency
         information.
         """
+        if not task.startswith("do_"):
+            task = "do_%s" % task
+
         runlist, taskdata = self.prepareTreeData(pkgs_to_build, task)
         rq = bb.runqueue.RunQueue(self, self.data, self.recipecaches, taskdata, runlist)
         rq.rqdata.prepare()
@@ -818,6 +823,9 @@ class BBCooker:
         """
         Create a dependency tree of pkgs_to_build, returning the data.
         """
+        if not task.startswith("do_"):
+            task = "do_%s" % task
+
         _, taskdata = self.prepareTreeData(pkgs_to_build, task)
 
         seen_fns = []
@@ -1322,6 +1330,8 @@ class BBCooker:
         # If we are told to do the None task then query the default task
         if (task == None):
             task = self.configuration.cmd
+        if not task.startswith("do_"):
+            task = "do_%s" % task
 
         fn, cls, mc = bb.cache.virtualfn2realfn(buildfile)
         fn = self.matchFile(fn)
@@ -1358,8 +1368,6 @@ class BBCooker:
         # Invalidate task for target if force mode active
         if self.configuration.force:
             logger.verbose("Invalidate task %s, %s", task, fn)
-            if not task.startswith("do_"):
-                task = "do_%s" % task
             bb.parse.siggen.invalidate_task(task, self.recipecaches[mc], fn)
 
         # Setup taskdata structure
@@ -1371,8 +1379,6 @@ class BBCooker:
         bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.expanded_data)
 
         # Execute the runqueue
-        if not task.startswith("do_"):
-            task = "do_%s" % task
         runlist = [[mc, item, task, fn]]
 
         rq = bb.runqueue.RunQueue(self, self.data, self.recipecaches, taskdata, runlist)
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cooker: Fix world taskgraph generation issue
  2016-12-07 12:31 [PATCH] cooker: Fix world taskgraph generation issue Richard Purdie
@ 2016-12-13  1:59 ` Robert Yang
  2016-12-13  3:43   ` akuster808
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Yang @ 2016-12-13  1:59 UTC (permalink / raw)
  To: Armin Kuster; +Cc: bitbake-devel


Hi Armin,

Morty also needs this fix, the reproducer is:

$ bitbake world -g

The pn-buildlist and *.dot are null,

// Robert

On 12/07/2016 08:31 PM, Richard Purdie wrote:
> The processing of the "do_" prefix to tasks is currently inconsistent
> and has resulted in "bitbake world -g" being broken as task prefixes
> don't get handled correctly.
>
> Make the "do_" task prefix handling consistent through various codepaths.
>
> [YOCTO #10651]
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  bitbake/lib/bb/cooker.py | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index 4810fe3..1fe693c 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -657,6 +657,8 @@ class BBCooker:
>          # A task of None means use the default task
>          if task is None:
>              task = self.configuration.cmd
> +        if not task.startswith("do_"):
> +            task = "do_%s" % task
>
>          fulltargetlist = self.checkPackages(pkgs_to_build, task)
>          taskdata = {}
> @@ -715,6 +717,9 @@ class BBCooker:
>          Create a dependency graph of pkgs_to_build including reverse dependency
>          information.
>          """
> +        if not task.startswith("do_"):
> +            task = "do_%s" % task
> +
>          runlist, taskdata = self.prepareTreeData(pkgs_to_build, task)
>          rq = bb.runqueue.RunQueue(self, self.data, self.recipecaches, taskdata, runlist)
>          rq.rqdata.prepare()
> @@ -818,6 +823,9 @@ class BBCooker:
>          """
>          Create a dependency tree of pkgs_to_build, returning the data.
>          """
> +        if not task.startswith("do_"):
> +            task = "do_%s" % task
> +
>          _, taskdata = self.prepareTreeData(pkgs_to_build, task)
>
>          seen_fns = []
> @@ -1322,6 +1330,8 @@ class BBCooker:
>          # If we are told to do the None task then query the default task
>          if (task == None):
>              task = self.configuration.cmd
> +        if not task.startswith("do_"):
> +            task = "do_%s" % task
>
>          fn, cls, mc = bb.cache.virtualfn2realfn(buildfile)
>          fn = self.matchFile(fn)
> @@ -1358,8 +1368,6 @@ class BBCooker:
>          # Invalidate task for target if force mode active
>          if self.configuration.force:
>              logger.verbose("Invalidate task %s, %s", task, fn)
> -            if not task.startswith("do_"):
> -                task = "do_%s" % task
>              bb.parse.siggen.invalidate_task(task, self.recipecaches[mc], fn)
>
>          # Setup taskdata structure
> @@ -1371,8 +1379,6 @@ class BBCooker:
>          bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.expanded_data)
>
>          # Execute the runqueue
> -        if not task.startswith("do_"):
> -            task = "do_%s" % task
>          runlist = [[mc, item, task, fn]]
>
>          rq = bb.runqueue.RunQueue(self, self.data, self.recipecaches, taskdata, runlist)
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cooker: Fix world taskgraph generation issue
  2016-12-13  1:59 ` Robert Yang
@ 2016-12-13  3:43   ` akuster808
  0 siblings, 0 replies; 3+ messages in thread
From: akuster808 @ 2016-12-13  3:43 UTC (permalink / raw)
  To: Robert Yang, Armin Kuster; +Cc: bitbake-devel


Robert,

On 12/12/2016 05:59 PM, Robert Yang wrote:
>
> Hi Armin,
>
> Morty also needs this fix, the reproducer is:
ok. thanks for point that out. I am currently working on a new pull request.

- armin
>
> $ bitbake world -g
>
> The pn-buildlist and *.dot are null,
>
> // Robert
>
> On 12/07/2016 08:31 PM, Richard Purdie wrote:
>> The processing of the "do_" prefix to tasks is currently inconsistent
>> and has resulted in "bitbake world -g" being broken as task prefixes
>> don't get handled correctly.
>>
>> Make the "do_" task prefix handling consistent through various 
>> codepaths.
>>
>> [YOCTO #10651]
>>
>> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>> ---
>>  bitbake/lib/bb/cooker.py | 14 ++++++++++----
>>  1 file changed, 10 insertions(+), 4 deletions(-)
>>
>> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
>> index 4810fe3..1fe693c 100644
>> --- a/bitbake/lib/bb/cooker.py
>> +++ b/bitbake/lib/bb/cooker.py
>> @@ -657,6 +657,8 @@ class BBCooker:
>>          # A task of None means use the default task
>>          if task is None:
>>              task = self.configuration.cmd
>> +        if not task.startswith("do_"):
>> +            task = "do_%s" % task
>>
>>          fulltargetlist = self.checkPackages(pkgs_to_build, task)
>>          taskdata = {}
>> @@ -715,6 +717,9 @@ class BBCooker:
>>          Create a dependency graph of pkgs_to_build including reverse 
>> dependency
>>          information.
>>          """
>> +        if not task.startswith("do_"):
>> +            task = "do_%s" % task
>> +
>>          runlist, taskdata = self.prepareTreeData(pkgs_to_build, task)
>>          rq = bb.runqueue.RunQueue(self, self.data, 
>> self.recipecaches, taskdata, runlist)
>>          rq.rqdata.prepare()
>> @@ -818,6 +823,9 @@ class BBCooker:
>>          """
>>          Create a dependency tree of pkgs_to_build, returning the data.
>>          """
>> +        if not task.startswith("do_"):
>> +            task = "do_%s" % task
>> +
>>          _, taskdata = self.prepareTreeData(pkgs_to_build, task)
>>
>>          seen_fns = []
>> @@ -1322,6 +1330,8 @@ class BBCooker:
>>          # If we are told to do the None task then query the default 
>> task
>>          if (task == None):
>>              task = self.configuration.cmd
>> +        if not task.startswith("do_"):
>> +            task = "do_%s" % task
>>
>>          fn, cls, mc = bb.cache.virtualfn2realfn(buildfile)
>>          fn = self.matchFile(fn)
>> @@ -1358,8 +1368,6 @@ class BBCooker:
>>          # Invalidate task for target if force mode active
>>          if self.configuration.force:
>>              logger.verbose("Invalidate task %s, %s", task, fn)
>> -            if not task.startswith("do_"):
>> -                task = "do_%s" % task
>>              bb.parse.siggen.invalidate_task(task, 
>> self.recipecaches[mc], fn)
>>
>>          # Setup taskdata structure
>> @@ -1371,8 +1379,6 @@ class BBCooker:
>>          bb.event.fire(bb.event.BuildStarted(buildname, [item]), 
>> self.expanded_data)
>>
>>          # Execute the runqueue
>> -        if not task.startswith("do_"):
>> -            task = "do_%s" % task
>>          runlist = [[mc, item, task, fn]]
>>
>>          rq = bb.runqueue.RunQueue(self, self.data, 
>> self.recipecaches, taskdata, runlist)
>>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-13  3:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-07 12:31 [PATCH] cooker: Fix world taskgraph generation issue Richard Purdie
2016-12-13  1:59 ` Robert Yang
2016-12-13  3:43   ` akuster808

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.