On Wed, Apr 27, 2016 at 6:19 PM, Christopher Larson <clar...@kergoth.com> wrote: > > > On Wed, Apr 27, 2016 at 9:11 AM, Ulf Magnusson <ulfali...@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 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto