* [PATCH] cooker: Add option of specifying indvidual tasks for targets
@ 2014-01-27 14:37 Richard Purdie
2014-01-27 22:39 ` Khem Raj
0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2014-01-27 14:37 UTC (permalink / raw)
To: bitbake-devel
Currently its near enough impossible to tell bitbake to run target X,
task Y and target A, task B. We could hack various parts of the API
around but it would mean incompatibilities.
An alternative is to accept the syntax "<target>:do_<task>" as a target
name. The default task would be used where the task is unspecified.
This has the advantage that its neat/clean code and works from all
current APIs including the commandline.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index db4cb51..cc7d84e 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -449,9 +449,14 @@ class BBCooker:
current = 0
runlist = []
for k in fulltargetlist:
+ ktask = task
+ if ":do_" in k:
+ k2 = k.split(":do_")
+ k = k2[0]
+ ktask = k2[1]
taskdata.add_provider(localdata, self.recipecache, k)
current += 1
- runlist.append([k, "do_%s" % task])
+ runlist.append([k, "do_%s" % ktask])
bb.event.fire(bb.event.TreeDataPreparationProgress(current, len(fulltargetlist)), self.data)
taskdata.add_unresolved(localdata, self.recipecache)
bb.event.fire(bb.event.TreeDataPreparationCompleted(len(fulltargetlist)), self.data)
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] cooker: Add option of specifying indvidual tasks for targets
2014-01-27 14:37 [PATCH] cooker: Add option of specifying indvidual tasks for targets Richard Purdie
@ 2014-01-27 22:39 ` Khem Raj
2014-01-27 22:43 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2014-01-27 22:39 UTC (permalink / raw)
To: Richard Purdie; +Cc: bitbake-devel
On Mon, Jan 27, 2014 at 6:37 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> Currently its near enough impossible to tell bitbake to run target X,
> task Y and target A, task B. We could hack various parts of the API
> around but it would mean incompatibilities.
>
> An alternative is to accept the syntax "<target>:do_<task>" as a target
> name. The default task would be used where the task is unspecified.
>
This should be documented in manuals as well IMO
> This has the advantage that its neat/clean code and works from all
> current APIs including the commandline.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index db4cb51..cc7d84e 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -449,9 +449,14 @@ class BBCooker:
> current = 0
> runlist = []
> for k in fulltargetlist:
> + ktask = task
> + if ":do_" in k:
> + k2 = k.split(":do_")
> + k = k2[0]
> + ktask = k2[1]
> taskdata.add_provider(localdata, self.recipecache, k)
> current += 1
> - runlist.append([k, "do_%s" % task])
> + runlist.append([k, "do_%s" % ktask])
> bb.event.fire(bb.event.TreeDataPreparationProgress(current, len(fulltargetlist)), self.data)
> taskdata.add_unresolved(localdata, self.recipecache)
> bb.event.fire(bb.event.TreeDataPreparationCompleted(len(fulltargetlist)), self.data)
>
>
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/bitbake-devel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] cooker: Add option of specifying indvidual tasks for targets
2014-01-27 22:39 ` Khem Raj
@ 2014-01-27 22:43 ` Richard Purdie
0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2014-01-27 22:43 UTC (permalink / raw)
To: Khem Raj; +Cc: bitbake-devel, Rifenbark, Scott M
On Mon, 2014-01-27 at 14:39 -0800, Khem Raj wrote:
> On Mon, Jan 27, 2014 at 6:37 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > Currently its near enough impossible to tell bitbake to run target X,
> > task Y and target A, task B. We could hack various parts of the API
> > around but it would mean incompatibilities.
> >
> > An alternative is to accept the syntax "<target>:do_<task>" as a target
> > name. The default task would be used where the task is unspecified.
> >
>
> This should be documented in manuals as well IMO
Totally agreed.
Hi Scott, we need to document this new syntax! ;-)
(I was planning to talk to Scott when I reached the point of merging
this)
Cheers,
Richard
> > This has the advantage that its neat/clean code and works from all
> > current APIs including the commandline.
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> > diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> > index db4cb51..cc7d84e 100644
> > --- a/bitbake/lib/bb/cooker.py
> > +++ b/bitbake/lib/bb/cooker.py
> > @@ -449,9 +449,14 @@ class BBCooker:
> > current = 0
> > runlist = []
> > for k in fulltargetlist:
> > + ktask = task
> > + if ":do_" in k:
> > + k2 = k.split(":do_")
> > + k = k2[0]
> > + ktask = k2[1]
> > taskdata.add_provider(localdata, self.recipecache, k)
> > current += 1
> > - runlist.append([k, "do_%s" % task])
> > + runlist.append([k, "do_%s" % ktask])
> > bb.event.fire(bb.event.TreeDataPreparationProgress(current, len(fulltargetlist)), self.data)
> > taskdata.add_unresolved(localdata, self.recipecache)
> > bb.event.fire(bb.event.TreeDataPreparationCompleted(len(fulltargetlist)), self.data)
> >
> >
> > _______________________________________________
> > bitbake-devel mailing list
> > bitbake-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/bitbake-devel
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-27 22:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-27 14:37 [PATCH] cooker: Add option of specifying indvidual tasks for targets Richard Purdie
2014-01-27 22:39 ` Khem Raj
2014-01-27 22:43 ` Richard Purdie
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.