* Dumping (inferred) do_task[vardeps] for some do_task
@ 2016-04-27 16:11 Ulf Magnusson
2016-04-27 16:19 ` Christopher Larson
0 siblings, 1 reply; 3+ messages in thread
From: Ulf Magnusson @ 2016-04-27 16:11 UTC (permalink / raw)
To: yocto
Hello,
I'm trying to get a feel for how BitBake infers task dependencies. The
easiest way (but I'm open to suggestions) seems to be to dump the
value of do_task[vardeps] for a particular recipe after the inferred
dependencies are added.
What's a good way to dump do_task[vardeps]? I tried using getVarFlag()
in an anonymous Python function, but it only catches dependencies
explicitly added to do_task[vardeps]. Maybe [vardeps] is never
assigned the complete set of dependencies internally, or maybe the
anonymous Python function is called too early.
generate_dependencies() in bitbake/lib/bb/data.py also looked
promising, but maybe there's a better places further up the callstack.
Thanks a lot,
Ulf
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Dumping (inferred) do_task[vardeps] for some do_task
2016-04-27 16:11 Dumping (inferred) do_task[vardeps] for some do_task Ulf Magnusson
@ 2016-04-27 16:19 ` Christopher Larson
2016-04-27 16:31 ` Ulf Magnusson
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Larson @ 2016-04-27 16:19 UTC (permalink / raw)
To: Ulf Magnusson; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 1390 bytes --]
On Wed, Apr 27, 2016 at 9:11 AM, Ulf Magnusson <ulfalizer@gmail.com> wrote:
> I'm trying to get a feel for how BitBake infers task dependencies. The
> easiest way (but I'm open to suggestions) seems to be to dump the
> value of do_task[vardeps] for a particular recipe after the inferred
> dependencies are added.
>
> What's a good way to dump do_task[vardeps]? I tried using getVarFlag()
> in an anonymous Python function, but it only catches dependencies
> explicitly added to do_task[vardeps]. Maybe [vardeps] is never
> assigned the complete set of dependencies internally, or maybe the
> anonymous Python function is called too early.
>
That's correct, the full list is not stored in the vardeps.
generate_dependencies() in bitbake/lib/bb/data.py also looked
> promising, but maybe there's a better places further up the callstack.
>
That is a reasonable place in the code, yes. You can inspect a certain
amount of information in the signature data files, but I'm not sure it
drills down to the level you desire.
My 'bb' tool's 'show' subcommand can show not just a variable but also its
dependencies, perhaps that might be of use? I haven't touched it in ages,
but in theory it should work.
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
[-- Attachment #2: Type: text/html, Size: 2069 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Dumping (inferred) do_task[vardeps] for some do_task
2016-04-27 16:19 ` Christopher Larson
@ 2016-04-27 16:31 ` Ulf Magnusson
0 siblings, 0 replies; 3+ messages in thread
From: Ulf Magnusson @ 2016-04-27 16:31 UTC (permalink / raw)
To: Christopher Larson; +Cc: yocto
On Wed, Apr 27, 2016 at 6:19 PM, Christopher Larson <clarson@kergoth.com> wrote:
>
>
> On Wed, Apr 27, 2016 at 9:11 AM, Ulf Magnusson <ulfalizer@gmail.com> wrote:
>>
>> I'm trying to get a feel for how BitBake infers task dependencies. The
>> easiest way (but I'm open to suggestions) seems to be to dump the
>> value of do_task[vardeps] for a particular recipe after the inferred
>> dependencies are added.
>>
>> What's a good way to dump do_task[vardeps]? I tried using getVarFlag()
>> in an anonymous Python function, but it only catches dependencies
>> explicitly added to do_task[vardeps]. Maybe [vardeps] is never
>> assigned the complete set of dependencies internally, or maybe the
>> anonymous Python function is called too early.
>
>
> That's correct, the full list is not stored in the vardeps.
>
That was what I was starting to suspect. Thanks for conforming.
>> generate_dependencies() in bitbake/lib/bb/data.py also looked
>> promising, but maybe there's a better places further up the callstack.
>
>
> That is a reasonable place in the code, yes. You can inspect a certain
> amount of information in the signature data files, but I'm not sure it
> drills down to the level you desire.
>
> My 'bb' tool's 'show' subcommand can show not just a variable but also its
> dependencies, perhaps that might be of use? I haven't touched it in ages,
> but in theory it should work.
From some quick experimentation,
$ bb show -d -r test_recipe do_compile
only gave me the source code and not the dependencies.
I found a hackish method that seems to work however. Adding
python () {
deps, _ = bb.data.build_dependencies("do_compile", set(), set(), set(), d)
bb.note("do_compile deps: ", str(deps))
}
to the recipe also prints all the inferred dependencies.
Thanks,
Ulf
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-27 16:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-27 16:11 Dumping (inferred) do_task[vardeps] for some do_task Ulf Magnusson
2016-04-27 16:19 ` Christopher Larson
2016-04-27 16:31 ` Ulf Magnusson
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.