Reputation: 135
Developing under Ubuntu, I am working on a web UI that is a small part of a full operating system. I had been using BeyondCompare to copy files from my development directory to the devtool directory.
~/develop/web_ui
~/develop/product/build/.build-yocto/workspace/sources/web_ui
I have moved to developing in Ubuntu under Windows WSL2 and have been advised not to use that method.
I had to modify the hash in webui.bb
to the latest build. It was 10 months and dozens of commits behind the latest commit. I do not control the recipe and do not wish to modify it.
Q1. Can I override the hash or version when I do devtool modify webui
?
I committed some files but they went to the branch devtool
. I ran devtool update-recipe webui
. It added file://0001-blah-blah-blah.path
to webui.bb
. That is not what I want.
Now I want the files back in ~/develop/web_ui
, where I have been developing for emulated testing. It looks like I have to push the devtool branch to the remote repository, pull it into the other directory tree, merge the changes and commit them to the master branch in the remote repository.
Q2. Is that how other developers do it or is there a simpler way?
Someone else will change the hash in webui.bb
when it is time for a new release. There will be no patches in the recipe.
Upvotes: 1
Views: 8389
Reputation: 848
Since you already have the source checked out where you prefer, and to the version you prefer - you can tell devtool modify
to use that source directory instead:
# devtool modify --no-extract recipename [srctree]
devtool modify --no-extract webui ~/develop/web_ui
The --no-extract
option tells devtool
to expect the source code to already exist, instead of the default behaviour of checking out a fresh copy.
Under the hood, devtool modify
works by creating a .bbappend
file which overrides the recipe's original steps for fetching and unpacking the source code - and replaces them with a reference to the srctree you specified above. Therefore, whilst it's in devtool
, any versioning/SRCREV specified in the original recipe will be ignored.
Whilst the recipe remains in devtool, your specified source will be used for all builds of that recipe.
Once you're happy with your changes (and have pushed/merged them into the main branch), you can remove the recipe from devtool (devtool reset webui
) and update the original recipe with the latest hash.
This devtool workflow (and a couple of others) are described in the manual for the eSDK:
2.4.2 Use
devtool modify
to Modify the Source of an Existing ComponentThe workflow above is the "Right" option
Note that the eSDK is not required to use devtool
, it just happens to be the eSDK section of the docs that best describes devtool modify
.
Upvotes: 4