Bug 13079

Summary: devtool documentation needs to mention oe-local-files
Product: [Documentation] General Docs Reporter: Paul Eggleton <bluelightning>
Component: docs-generalAssignee: Michael Opdenacker <michael.opdenacker>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: mark.morton, michael.opdenacker, randy.macleod, srifenbark, tim.orling
Version: unspecified   
Target Milestone: 3.4   
Hardware: x86   
OS: Multiple   
Whiteboard: 24 June 2018: IN PROGRESS DESIGN
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Paul Eggleton 2018-12-12 19:23:08 UTC
When you run devtool modify or devtool upgrade, any non-patch local files (i.e. files referred to by file:// entries in SRC_URI excluding *.patch/*.diff) will be copied to an oe-local-files under the newly created source tree so that you have a place to modify them a bit more easily. Any changes or additions to those files will be incorporated into the build on the next run, as with changes to the source, and when you have completed your work and run devtool finish, the original files next to the recipe will be updated. This feature is not currently mentioned in the documentation, so we should add it.
Comment 1 Scott Rifenbark 2018-12-18 01:06:03 UTC
Paul, 

What happens to the "oe-local-files" folder that is created under any newly created source tree after the user runs "devtool finish"?  Running "devtool finish" copies any modified non *.patch and *.diff files back up into the source tree where they originated presumably overwriting the originals so the changes are preserved.  Is that "oe-local-files" folder deleted or does it hang around?

Another question...  For "devtool modify", three common entry points are documented for starting the tool (see https://yoctoproject.org/docs/2.7/sdk-manual/sdk-manual.html#sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component).  For the "left" scenario, is the "oe-local-files" folder a sub folder of "sources"?  For the right scenario, we don't create a "oe-local-files" folder in the 3rd-party extracted source tree do we?  Can you give me more details for the left and right entry scenarios?

Thanks,
Scott
Comment 2 Stephen K Jolley 2019-02-21 16:15:17 UTC
Paul, Please answer this question.
Comment 3 Paul Eggleton 2019-06-24 04:17:50 UTC
The oe-local-files subdirectory is preserved after devtool finish, just like the rest of the source tree. Note that oe-local-files wouldn't contain any .patch/.diff files (if that's what you meant) since those are handled in the form of commits in git within the source tree.

Re the other branches, the middle branch is pretty much the same as the left - we're just telling it to put the source tree in a specific location rather than using the default under the workspace. For the right hand branch, files in an oe-local-files subdirectory will be used if the subdirectory exists, however if it does not by the time that you run devtool finish then the files will be removed from next to the recipe (and SRC_URI) because it will appear to devtool as if you deleted them.
Comment 4 Scott Rifenbark 2019-06-24 23:00:52 UTC
Paul, 

Can you review the changes to the first section based on your comments?

https://yoctoproject.org/docs/2.8/sdk-manual/sdk-manual.html#sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component

Thanks, 
Scott
Comment 6 Scott Rifenbark 2019-08-15 17:50:19 UTC
Pinging for review.

Thanks,
Scott
Comment 8 Michael Opdenacker 2021-07-15 09:57:10 UTC
Closing this bug as it seems that Scott properly included this topic in the documentation.