代码拉取完成,页面将自动刷新
同步操作将从 anolis/leapp 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 1506fc7e88e504751eb7ceaecef4de4b849ff30c Mon Sep 17 00:00:00 2001
From: Chunmei Xu <xuchunmei@openanolis.org>
Date: Wed, 19 May 2021 16:23:19 +0800
Subject: [PATCH 3/3] on anolis platform_id should be an8 instead of el8
Signed-off-by: Chunmei Xu <xuchunmei@openanolis.org>
---
.../targetuserspacecreator/libraries/userspacegen.py | 10 +++++++++-
repos/system_upgrade/el7toel8/libraries/dnfplugin.py | 11 +++++++++--
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/repos/system_upgrade/el7toel8/actors/targetuserspacecreator/libraries/userspacegen.py b/repos/system_upgrade/el7toel8/actors/targetuserspacecreator/libraries/userspacegen.py
index 69b3e6a..b2d40aa 100644
--- a/repos/system_upgrade/el7toel8/actors/targetuserspacecreator/libraries/userspacegen.py
+++ b/repos/system_upgrade/el7toel8/actors/targetuserspacecreator/libraries/userspacegen.py
@@ -102,6 +102,14 @@ class _InputData(object):
raise StopActorExecutionError('No storage info available cannot proceed.')
+def get_platform_id(target_repoids):
+ platform_id = 'platform:el8'
+ for repo in target_repoids:
+ if repo.find('Anolis') != -1 or repo.find('anolis') != -1:
+ platform_id = 'platform:an8'
+ return platform_id
+ return platform_id
+
def prepare_target_userspace(context, userspace_dir, enabled_repos, packages):
"""
Implement the creation of the target userspace.
@@ -115,7 +123,7 @@ def prepare_target_userspace(context, userspace_dir, enabled_repos, packages):
'install',
'-y',
'--nogpgcheck',
- '--setopt=module_platform_id=platform:el8',
+ '--setopt=module_platform_id='+get_platform_id(enabled_repos),
'--setopt=keepcache=1',
'--releasever', api.current_actor().configuration.version.target,
'--installroot', '/el8target',
diff --git a/repos/system_upgrade/el7toel8/libraries/dnfplugin.py b/repos/system_upgrade/el7toel8/libraries/dnfplugin.py
index 719e916..d271212 100644
--- a/repos/system_upgrade/el7toel8/libraries/dnfplugin.py
+++ b/repos/system_upgrade/el7toel8/libraries/dnfplugin.py
@@ -30,6 +30,13 @@ def install(target_basedir):
message='Failed to install DNF plugin. Error: {}'.format(str(e))
)
+def get_platform_id(target_repoids):
+ platform_id = 'platform:el8'
+ for repo in target_repoids:
+ if repo.find('Anolis') != -1 or repo.find('anolis') != -1:
+ platform_id = 'platform:an8'
+ return platform_id
+ return platform_id
def build_plugin_data(target_repoids, debug, test, tasks, on_aws):
"""
@@ -50,7 +57,7 @@ def build_plugin_data(target_repoids, debug, test, tasks, on_aws):
'disable_repos': True,
'enable_repos': target_repoids,
'gpgcheck': False,
- 'platform_id': 'platform:el8',
+ 'platform_id': get_platform_id(target_repoids),
'releasever': api.current_actor().configuration.version.target,
'installroot': '/installroot',
'test_flag': test
@@ -175,7 +182,7 @@ def install_initramdisk_requirements(packages, target_userspace_info, used_repos
'install',
'-y',
'--nogpgcheck',
- '--setopt=module_platform_id=platform:el8',
+ '--setopt=module_platform_id='+get_platform_id(target_repoids),
'--setopt=keepcache=1',
'--releasever', api.current_actor().configuration.version.target,
'--disablerepo', '*'
--
2.29.2
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。