Bug 6447 - Add ability to find a target file and create a bbappend to replace it
Summary: Add ability to find a target file and create a bbappend to replace it
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: configuration (show other bugs)
Version: 1.7
Hardware: All Multiple
: Medium enhancement
Target Milestone: 1.9
Assignee: Paul Eggleton
QA Contact: Daniel Istrate
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-06-13 13:27 UTC by Paul Eggleton
Modified: 2015-10-09 13:11 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2014-06-13 13:27:10 UTC
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.)
Comment 2 Daniel Istrate 2015-10-09 13:11:25 UTC
Verified on master: eac61f37e36099f74485dab398b57f3812826d17

Functionality testing is covered in oe-selftest testcases from devtool and recipetool.