1 Star 0 Fork 106

yanan-rock/anaconda

forked from src-openEuler/anaconda 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bugfix-Fix-issue-that-treeinfo-repositories-were-never-disa.patch 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
xuxiaolong 提交于 2021-04-02 10:25 . sync 49 fixbug from github
From a57be7d30897ecf301de673e41d1af975b4f593b Mon Sep 17 00:00:00 2001
From: Jiri Konecny <jkonecny@redhat.com>
Date: Wed, 29 Jul 2020 14:12:51 +0200
Subject: [PATCH] Fix issue that treeinfo repositories were never disabled
The add_repo() method always enable repository at the end. We should improve
this correctly in the upstream to avoid the confusion.
Related: rhbz#1851207
(cherry picked from commit d26f4e4cd054288360993220bc9cee4b7abf5ddc)
---
pyanaconda/payload/dnf/payload.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/payload/dnf/payload.py b/pyanaconda/payload/dnf/payload.py
index 02a66cd25..56c52f54e 100644
--- a/pyanaconda/payload/dnf/payload.py
+++ b/pyanaconda/payload/dnf/payload.py
@@ -1852,7 +1852,11 @@ class DNFPayload(Payload):
repo.treeinfo_origin = True
log.debug("Adding new treeinfo repository: %s enabled: %s",
repo_md.name, repo_enabled)
- self.add_repo(repo)
+
+ if repo_enabled:
+ self.add_repo(repo)
+ else:
+ self.add_disabled_repo(repo)
def _cleanup_old_treeinfo_repositories(self):
"""Remove all old treeinfo repositories before loading new ones.
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yanan-rock/anaconda.git
git@gitee.com:yanan-rock/anaconda.git
yanan-rock
anaconda
anaconda
master

搜索帮助