1 Star 0 Fork 97

王策/anaconda

forked from src-openEuler/anaconda 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bugfix-Fix-the-logic-for-enabling-latest-updates.patch 1.77 KB
一键复制 编辑 原始数据 按行查看 历史
xuxiaolong 提交于 2021-04-02 10:25 . sync 49 fixbug from github
From 98e011f1f8af900ed6f65432ad7466973d44735a Mon Sep 17 00:00:00 2001
From: Vendula Poncova <vponcova@redhat.com>
Date: Fri, 27 Nov 2020 14:33:31 +0100
Subject: [PATCH] Fix the logic for enabling latest updates
Fix bugs introduced in the commit 4a2b8f2. The negation of the logic wasn't
applied correctly. Without the fix, updates repositories are disabled when the
updates are enabled.
---
pyanaconda/ui/gui/spokes/installation_source.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/installation_source.py b/pyanaconda/ui/gui/spokes/installation_source.py
index 00a180613..e528d8662 100644
--- a/pyanaconda/ui/gui/spokes/installation_source.py
+++ b/pyanaconda/ui/gui/spokes/installation_source.py
@@ -1085,7 +1085,7 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler, SourceSwitchHandler):
uncheck it.
"""
self._updates_box.set_sensitive(self._mirror_active())
- active = self._mirror_active() or self.payload.is_repo_enabled("updates")
+ active = self._mirror_active() and self.payload.is_repo_enabled("updates")
self._updates_radio_button.set_active(active)
@property
@@ -1646,10 +1646,8 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler, SourceSwitchHandler):
def on_updatesRadioButton_toggled(self, button):
"""Toggle the enable state of the updates repo."""
- if self._updates_radio_button.get_active():
- self.payload.set_updates_enabled(False)
- else:
- self.payload.set_updates_enabled(True)
+ active = self._updates_radio_button.get_active()
+ self.payload.set_updates_enabled(active)
# Refresh the metadata using the new set of repos
self._updates_change = True
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangce1988/anaconda.git
git@gitee.com:wangce1988/anaconda.git
wangce1988
anaconda
anaconda
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385