Locating which recipe provides a file in an image that you want to modify can be a tedious process. We should create a tool that finds which recipe a particular config file (or other file I want to replace) comes from, and then automatically creates a bbappend to substitute my version. As long as we assume a build has completed already, we have the part that tracks down the recipe from a file - albeit in a not-very-easy-to-use form - in scripts/oe-pkgdata-util (with its "find-path" command). Toaster has the functionality to do this as well. We'd need to use the build system to tell us the right recipe to pick if there are multiple providers. For creating the bbappend, this is also moderately challenging since: * The original file may be directly in SRC_URI (in which case we don't need to add it) or provided as part of a source tree (e.g. upstream tarball, in which case we do). We'll also have to interpret install lines in do_install as a way of mapping back files installed by the package to entries in SRC_URI. * There might already be a bbappend in the current configuration which provides its own version of the file. (Perhaps we ignore this part of the problem initially.)
Implementation merged to master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=fbfc06a969200e582a059c9943e6fd17aca70e30 Note that this does require some of the preceding commits including some in bitbake that have recently been merged: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=ba0546bfaf23aa5ba1033e348a0a1addf0623abb http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=aefc80c02ed6d4de5768723d86ce80520387e1d3
Verified on master: eac61f37e36099f74485dab398b57f3812826d17 Functionality testing is covered in oe-selftest testcases from devtool and recipetool.