Enabling recipe specific sysroots would mean that only items present in a task's DEPENDS would be present in the sysroot so there would be 100% deterministic builds as dependencies couldn't be accidentally be satifised as per the current shared sysroot. From a practical implementation level, this would mean the addition of a populate_recipe_sysroot task before do_configure which would replace the existing populate_sysroot task.
There is a proof of concept patch on the oe-architecture list.
I think this would be a great improvement to the build system. One minor downside is that we would not accidentally discover missing dependencies by finding race conditions in the builds. Do you think that we should add yet another flag to permit the existing sysroot behaviour or do we just have to come up with a more intelligent way, that doesn't involve error-prone developers, for discovering package dependencies?
I think if you want to know what optional deps a project has, you should read the documentation on the project, run ./configure --help, or read configure.in :)
That's your fix? It'll never work reliably, at least for other people. :) Random discovery isn't much or any better though.
Just over 5 years later from when I originally filed this, it finally has landed: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=9107d6ca144ac1f6169830dee25dae2dad775333