1 Star 0 Fork 10

崔立昊/leapp

forked from anolis/leapp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0008-compat-platform_id-to-al8-when-upgrade-to-alinux3.patch 2.07 KB
一键复制 编辑 原始数据 按行查看 历史
Meredith 提交于 2021-08-27 10:48 . add leapp-repository related files
From 158fa91d22a7987235f20ecc6bd84160a4b20b18 Mon Sep 17 00:00:00 2001
From: Chunmei Xu <xuchunmei@openanolis.org>
Date: Fri, 18 Jun 2021 14:19:53 +0800
Subject: [PATCH] compat platform_id to al8 when upgrade to alinux3
Signed-off-by: Chunmei Xu <xuchunmei@openanolis.org>
---
.../actors/targetuserspacecreator/libraries/userspacegen.py | 5 ++++-
repos/system_upgrade/el7toel8/libraries/dnfplugin.py | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/repos/system_upgrade/el7toel8/actors/targetuserspacecreator/libraries/userspacegen.py b/repos/system_upgrade/el7toel8/actors/targetuserspacecreator/libraries/userspacegen.py
index f2d867c..7f96e0e 100644
--- a/repos/system_upgrade/el7toel8/actors/targetuserspacecreator/libraries/userspacegen.py
+++ b/repos/system_upgrade/el7toel8/actors/targetuserspacecreator/libraries/userspacegen.py
@@ -107,7 +107,10 @@ def get_platform_id(target_repoids):
for repo in target_repoids:
if repo.find('Anolis') != -1 or repo.find('anolis') != -1:
platform_id = 'platform:an8'
- return platform_id
+ break
+ elif repo.find('Alinux3') != -1 or repo.find('alinux3') != -1:
+ platform_id = 'platform:al8'
+ break
return platform_id
def prepare_target_userspace(context, userspace_dir, enabled_repos, packages):
diff --git a/repos/system_upgrade/el7toel8/libraries/dnfplugin.py b/repos/system_upgrade/el7toel8/libraries/dnfplugin.py
index d271212..467d9ea 100644
--- a/repos/system_upgrade/el7toel8/libraries/dnfplugin.py
+++ b/repos/system_upgrade/el7toel8/libraries/dnfplugin.py
@@ -35,7 +35,10 @@ def get_platform_id(target_repoids):
for repo in target_repoids:
if repo.find('Anolis') != -1 or repo.find('anolis') != -1:
platform_id = 'platform:an8'
- return platform_id
+ break
+ if repo.find('Alinux3') != -1 or repo.find('alinux3') != -1:
+ platform_id = 'platform:al8'
+ break
return platform_id
def build_plugin_data(target_repoids, debug, test, tasks, on_aws):
--
2.29.2
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cui-lihao/leapp.git
git@gitee.com:cui-lihao/leapp.git
cui-lihao
leapp
leapp
master

搜索帮助