All of lore.kernel.org
 help / color / mirror / Atom feed
* One question about taskdata and runqueue
@ 2012-02-27 13:51 Xu, Dongxiao
  2012-02-27 16:19 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Xu, Dongxiao @ 2012-02-27 13:51 UTC (permalink / raw)
  To: yocto

Hi list,

If I have two recipes, see following. Both of them provides
"virtual/test" and has package named "test-test", the only difference is
the RDEPENDS of the package "test-test".

test-a_1.0.bb

PROVIDES = "virtual/test"
PACKAGES = "test-test"
# Assume that the abcd package are provided by recipe abcd.bb
RDEPENDS_test-test = "abcd"


test-b_1.0.bb

PROVIDES = "virtual/test"
PACKAGES = "test-test"

In a certain configuration file, we have the PREFERRED_PROVIDER set as:
PREFERRED_PROVIDER_virtual/test = "test-a".

Then if a real recipe, for example, the 'v86d', depends on the
"virtual/test":
DEPENDS = "virtual/test"

Finally if I run the following command:
# bitbake v86d

We know that the recipe "abcd" will be included in the runqueue.

My question is, can we get the build dependency to recipe "abcd" through
taskdata? Or it is finalized until we create the RunQueue object?


Thanks for help!
-- Dongxiao



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

* Re: One question about taskdata and runqueue
  2012-02-27 13:51 One question about taskdata and runqueue Xu, Dongxiao
@ 2012-02-27 16:19 ` Richard Purdie
  2012-02-28  2:21   ` Xu, Dongxiao
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2012-02-27 16:19 UTC (permalink / raw)
  To: Xu, Dongxiao; +Cc: yocto

On Mon, 2012-02-27 at 21:51 +0800, Xu, Dongxiao wrote:
> Hi list,
> 
> If I have two recipes, see following. Both of them provides
> "virtual/test" and has package named "test-test", the only difference is
> the RDEPENDS of the package "test-test".
> 
> test-a_1.0.bb
> 
> PROVIDES = "virtual/test"
> PACKAGES = "test-test"
> # Assume that the abcd package are provided by recipe abcd.bb
> RDEPENDS_test-test = "abcd"
> 
> 
> test-b_1.0.bb
> 
> PROVIDES = "virtual/test"
> PACKAGES = "test-test"
> 
> In a certain configuration file, we have the PREFERRED_PROVIDER set as:
> PREFERRED_PROVIDER_virtual/test = "test-a".
> 
> Then if a real recipe, for example, the 'v86d', depends on the
> "virtual/test":
> DEPENDS = "virtual/test"
> 
> Finally if I run the following command:
> # bitbake v86d
> 
> We know that the recipe "abcd" will be included in the runqueue.
> 
> My question is, can we get the build dependency to recipe "abcd" through
> taskdata? Or it is finalized until we create the RunQueue object?

task data should have a list of providers for "virtual/test", sorted in
priority order. There should be two entries in that list, one for test-a
and test-b. Since you set the preferred provider, you should have test-a
as the first item.

Once you resolve it to a recipe file, you should be able to look at the
recipe file's dependencies in dataCache.

The trouble is you're now resolving all the dependencies in the code I
think you're referring to. This was in general the job of
prepare_runqueue() and I'm starting to worry you're duplicating its
functionality.

Cheers,

Richard



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

* Re: One question about taskdata and runqueue
  2012-02-27 16:19 ` Richard Purdie
@ 2012-02-28  2:21   ` Xu, Dongxiao
  0 siblings, 0 replies; 3+ messages in thread
From: Xu, Dongxiao @ 2012-02-28  2:21 UTC (permalink / raw)
  To: Richard Purdie; +Cc: yocto

On Mon, 2012-02-27 at 16:19 +0000, Richard Purdie wrote:
> On Mon, 2012-02-27 at 21:51 +0800, Xu, Dongxiao wrote:
> > Hi list,
> > 
> > If I have two recipes, see following. Both of them provides
> > "virtual/test" and has package named "test-test", the only difference is
> > the RDEPENDS of the package "test-test".
> > 
> > test-a_1.0.bb
> > 
> > PROVIDES = "virtual/test"
> > PACKAGES = "test-test"
> > # Assume that the abcd package are provided by recipe abcd.bb
> > RDEPENDS_test-test = "abcd"
> > 
> > 
> > test-b_1.0.bb
> > 
> > PROVIDES = "virtual/test"
> > PACKAGES = "test-test"
> > 
> > In a certain configuration file, we have the PREFERRED_PROVIDER set as:
> > PREFERRED_PROVIDER_virtual/test = "test-a".
> > 
> > Then if a real recipe, for example, the 'v86d', depends on the
> > "virtual/test":
> > DEPENDS = "virtual/test"
> > 
> > Finally if I run the following command:
> > # bitbake v86d
> > 
> > We know that the recipe "abcd" will be included in the runqueue.
> > 
> > My question is, can we get the build dependency to recipe "abcd" through
> > taskdata? Or it is finalized until we create the RunQueue object?
> 
> task data should have a list of providers for "virtual/test", sorted in
> priority order. There should be two entries in that list, one for test-a
> and test-b. Since you set the preferred provider, you should have test-a
> as the first item.
> 
> Once you resolve it to a recipe file, you should be able to look at the
> recipe file's dependencies in dataCache.
> 
> The trouble is you're now resolving all the dependencies in the code I
> think you're referring to. This was in general the job of
> prepare_runqueue() and I'm starting to worry you're duplicating its
> functionality.

Hmm, previously we use the taskdata is to reduce the time for building
up the dependency tree. It seems that we will have to use runqueue to
determine the dependency.

Thanks,
Dongxiao

> 
> Cheers,
> 
> Richard
> 




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

end of thread, other threads:[~2012-02-28  2:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-27 13:51 One question about taskdata and runqueue Xu, Dongxiao
2012-02-27 16:19 ` Richard Purdie
2012-02-28  2:21   ` Xu, Dongxiao

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.