qt - 在 Yocto 中应用 .patch 文件不起作用
问题描述
我正在尝试从 Yocto 修补自定义 qt 虚拟键盘。
首先,我克隆了那个键盘的 git repo,更改了一个文件(只需将旧版本的 .otf 替换为新文件),提交更改并创建执行的补丁文件:
git format-patch -1 <COMMIT_ID> -o patches
结果我在 /patches/ 文件夹中有一个提交文件。我已经通过恢复更改并git apply <File.patch>
再次检查它。一切看起来都很好。
下一步。
我在/sources/meta-yogurt/recipes-qt/qt5/中有必要的 qtvirtualkeyboard_%.bbappend文件。我创建了新文件夹qtvirtualkeyboard并在那里复制了file.patch。
比我修改qtvirtualkeyboard_%.bbappend而不是它看起来像:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += \
"file://0001-Update-font-file.patch;striplevel=0"
PATCHTOOL = "git"
PACKAGECONFIG = " lang-de_DE lang-en_GB lang-ru_RU lang-zh_CN \
lang-it_IT lang-ja_JP"
我尝试使用和不使用 PATCHTOOL var 和 striplevel 来修改它 - 它没有产生任何结果。
最后,当我构建图像时,我收到下一个错误:
ERROR: qtvirtualkeyboard-5.9.8+gitAUTOINC+dc18b608b5-r0 do_patch: Applying '0001-Update-font-file.patch' failed:
can't find file to patch at input line 12
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 5defffb3a8afaa8e254cd2cf551d6126ead74014 Mon Sep 17 00:00:00 2001
|From: Savchenko Serhii <s.savchenko@smissltd.com>
|Date: Mon, 21 Sep 2020 11:41:37 +0300
|Subject: [PATCH] Update font file
|
|---
| FontAwesome.otf | Bin 85908 -> 465076 bytes
| 1 file changed, 0 insertions(+), 0 deletions(-)
|
|diff --git a/FontAwesome.otf b/FontAwesome.otf
|index 81c9ad949b47f64afeca5642ee2494b6e3147f44..7720e3739b64143d0a1dcb28fda78ac209afbcb8 100644
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
有谁知道如何解决它?
解决方案
推荐阅读
- php - 如何在 Wordpress 中使用 wp_link_pages() 在页面 url 中附加文本?
- python - python virtualenv 实例已损坏
- yii2 - 如何故意使 $model->save() 测试失败?
- javascript - 为什么 Babel 在转译到 ES2015 时不使用 javascript 类?
- wordpress - 在 Compute Engine 上为安装在 Nginx 上的 WordPress 设置 HTTP(S) 负载均衡器
- algorithm - 机器人可以到达一个点(x,y)吗?
- java - Spring Data Rest - 隐藏而不是暴露 ID
- c# - 每 x 次刷新一次查询
- c# - 如何在枚举表示属性字段并充当计数器(月)的 foreach 循环中使用枚举?
- android - 如何比 MIN_PERIODIC_INTERVAL_MILLIS 更快地测试 PeriodicWorkRequest?