我有一个meta-canboat
层,其中有一个食谱import json,re
filtered_data = '''[
{
"_id":"1231",
"address":"akjd-dfdkfj",
"body":"Your one time password is "sdkd". Enter this in the form to confirm your value.",
"date":"Thu May 10 23:34:11 GMT+05:30 2018"
},
{
"_id":"1245",
"address":"sdsd-dgfg",
"body":"Dear Customer, Reference number is 3435.To check latest status, sms DROP DFGDG on 38388338. Thank you, ABC",
"date":"Thu May 10 13:22:54 GMT+05:30 2018"
}
]'''
corrected_data=re.sub("^\s*\"body\":\"(.*)\",",lambda x:"\"body\":\""+x.group(1).replace("\"","'")+"\",",filtered_data,flags=re.M)
dicts_in_list=json.loads(corrected_data)
lists_in_dict={key:[item[key] for item in dicts_in_list] for key in dicts_in_list[0].keys() }
print(lists_in_dict)
。
我将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
,如何升级配方?
答案 0 :(得分:0)
如@danlor和@Nayfe所述,我在源代码树中为更新的Makefile
创建了补丁。
我使用以下命令添加了源树存储库:
devtool add canboat https://github.com/canboat/canboat.git
它应该在workspace/sources/canboat
文件夹中创建build
我使用以下内容创建了补丁:
# 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