更新上游版本时,选择补丁前patch-queue分支需要重新创建,使用gbp import --force

This commit is contained in:
谢炜 2023-12-01 14:25:50 +08:00
parent 16d1bc7208
commit 102cc8cc58
1 changed files with 4 additions and 4 deletions

View File

@ -431,10 +431,9 @@ git commit -m 'merge upstream 4.13.17'
```Bash ```Bash
# 基于旧版本创建临时分支 # 基于旧版本创建临时分支
git checkout packaging/openkylin/yangtze git checkout packaging/openkylin/yangtze
git checkout -b tmp
# 导入patch形成git commit记录 # 导入patch形成git commit记录
# 导入前也可以筛选一下补丁列表修改debian/patches/series删除不要的补丁然后提交即可 # 导入前也可以筛选一下补丁列表修改debian/patches/series删除不要的补丁然后提交即可
gbp pq import gbp pq import --force
# 计算补丁数量 # 计算补丁数量
wc debian/patches/series # 14 14 511 debian/patches/series wc debian/patches/series # 14 14 511 debian/patches/series
# 获取commit id重定向到文件保存 # 获取commit id重定向到文件保存
@ -458,7 +457,7 @@ git checkout packaging/openkylin/yangtze
git rm debian/patches/series git rm debian/patches/series
git commit -m 'prepare for new patch list' git commit -m 'prepare for new patch list'
# 创建临时分支移植低版本patch # 创建临时分支移植低版本patch
gbp pq import gbp pq import --force
# 从后往前读取patch-queue commit列表文件 /tmp/patch-list.txt根据提交信息和补丁文件名确定是否要集成该补丁对需要集成的补丁执行cherry-pick # 从后往前读取patch-queue commit列表文件 /tmp/patch-list.txt根据提交信息和补丁文件名确定是否要集成该补丁对需要集成的补丁执行cherry-pick
git cherry-pick b2cf5dd7923c50c4b4e1809564a7da63a3e38312 f32df40245f054363698225f44158c2673a06978 2853828b649d5c826bda93c9a11a9720954b915c git cherry-pick b2cf5dd7923c50c4b4e1809564a7da63a3e38312 f32df40245f054363698225f44158c2673a06978 2853828b649d5c826bda93c9a11a9720954b915c
# 导出patch列表 # 导出patch列表
@ -468,7 +467,8 @@ git add debian/patches
dch -R dch -R
git add debian/changelog git add debian/changelog
git commit -m 'Apply patches on new upstream 4.13.17' git commit -m 'Apply patches on new upstream 4.13.17'
git branch --delete --force tmp # 删除tmp分支 # patch-queue分支可以删除了
git branch -D patch-queue/packaging/openkylin/yangtze
``` ```
假如存在冲突根据实际需求进行冲突合并git mergetool; git cherry-pick --continue或者跳过此patchgit cherry-pick --skip 假如存在冲突根据实际需求进行冲突合并git mergetool; git cherry-pick --continue或者跳过此patchgit cherry-pick --skip