我有一个meta-canboat
层,里面有一个配方canboat_1.0.0.bb
。
我正在使用Yocto的krogoth
版本。
当我尝试在升级工作流中使用devtool
时,如下所示:
devtool upgrade canboat --version 1.2.0
我收到以下错误:
Parsing recipes..done.
NOTE: Fetching canboat...
NOTE: Unpacking...
NOTE: Patching...
NOTE: Unpacking /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/build/downloads/v1.2.0.tar.gz to /tmp/devtoolXfphO2/
WARNING: Command 'git rebase 04c3c274b585bb2c53ce8cc70930867b091a3c5f' failed:
First, rewinding head to replay your work on top of it...
Applying: Non-root user in Makefile
error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M Makefile
Falling back to patching base and 3-way merge...
Auto-merging Makefile
CONFLICT (content): Merge conflict in Makefile
Patch failed at 0001 Non-root user in Makefile
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
Traceback (most recent call last):
File "/home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/scripts/devtool", line 342, in <module>
ret = main()
File "/home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/scripts/devtool", line 329, in main
ret = args.func(args, config, basepath, workspace)
File "/home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/scripts/lib/devtool/upgrade.py", line 349, in upgrade
rf = _create_new_recipe(args.version, md5, sha256, args.srcrev, args.srcbranch, config.workspace_path, tinfoil, rd)
File "/home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/scripts/lib/devtool/upgrade.py", line 262, in _create_new_recipe
fullpath = _rename_recipe_files(origpath, bpn, oldpv, newpv, path)
File "/home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/scripts/lib/devtool/upgrade.py", line 98, in _rename_recipe_files
return _rename_recipe_file(oldrecipe, bpn, oldpv, newpv, path)
File "/home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/scripts/lib/devtool/upgrade.py", line 91, in _rename_recipe_file
shutil.move(os.path.join(path, oldrecipe), os.path.join(path, newrecipe))
File "/usr/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/usr/lib/python2.7/shutil.py", line 130, in copy2
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/home/des/Yocto/PHYTEC_BSPs/yocto_fsl/build/workspace/recipes/canboat/canboat_1.0.0.bb'
奇怪的是,workspace
目录只有files/
文件夹,该层中已经存在预先存在的补丁。
该图层已添加:
layer path priority
==========================================================================
meta /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/meta 5
meta-poky /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/meta-poky 5
meta-oe /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/../meta-openembedded/meta-oe 6
meta-networking /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/../meta-openembedded/meta-networking 5
meta-python /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/../meta-openembedded/meta-python 7
meta-multimedia /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/../meta-openembedded/meta-multimedia 6
meta-ruby /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/../meta-openembedded/meta-ruby 7
workspace /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/build/workspace 99
meta-phytec /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/../meta-phytec 20
meta-qt5 /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/../meta-qt5 7
meta-yogurt /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/../meta-yogurt 10
meta-UMG /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/../meta-UMG 6
meta-canboat /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/../meta-canboat 6
meta-influx /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/../meta-influx 6
meta-go /home/des/Yocto/PHYTEC_BSPs/yocto_fsl/sources/poky/../meta-go 1
这里出了什么问题?如果不是通过devtool
,如何升级食谱?
克罗哥特工作流程
正如@danlor和@Nayfe所述,我在源代码树中为更新的Makefile
创建了一个补丁。
-
我使用以下方法添加了源代码树存储库:
devtool add canboat https://github.com/canboat/canboat.git
它应该在
build
文件夹中创建workspace/sources/canboat
-
我使用以下方法创建了一个补丁:
# edit the Makefile using your editor (same change as the previous patch) git add Makefile git commit -m "Add non root user to new Makefile" git format-patch -1 -o ../sources/meta-canboat/recipes-support/canboat/files/
-
在
sources/meta-canboat
中,我删除了旧的v.1.0.0
配方并添加了新的v1.2.1
配方并重构了补丁文件。 -
将版本提升到
v1.0.0 -> v1.2.1
,并将代码推送到meta-canboat