1 Star 0 Fork 23

庞庆/anaconda_4

forked from src-anolis-os/anaconda 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0005-anaconda-anolis-remove-CDN.patch 13.15 KB
一键复制 编辑 原始数据 按行查看 历史
diff -Nuar anaconda-33.16.5.6.old/anaconda.py anaconda-33.16.5.6.new/anaconda.py
--- anaconda-33.16.5.6.old/anaconda.py 2021-09-24 20:36:00.000000000 +0800
+++ anaconda-33.16.5.6.new/anaconda.py 2022-01-18 10:16:44.364428299 +0800
@@ -620,25 +620,6 @@
from pyanaconda import exception
anaconda.mehConfig = exception.initExceptionHandling(anaconda)
- # Start the subscription handling thread if the Subscription DBus module
- # provides enough authentication data.
- # - as kickstart only supports org + key authentication & nothing
- # else currently talks to the Subscription DBus module,
- # we only check if organization id & at least one activation
- # key are available
- from pyanaconda.modules.common.util import is_module_available
- from pyanaconda.modules.common.constants.services import SUBSCRIPTION
- if is_module_available(SUBSCRIPTION):
- from pyanaconda.ui.lib.subscription import org_keys_sufficient, register_and_subscribe
- if org_keys_sufficient():
- threadMgr.add(
- AnacondaThread(
- name=constants.THREAD_SUBSCRIPTION,
- target=register_and_subscribe,
- args=[anaconda.payload]
- )
- )
-
# add additional repositories from the cmdline to kickstart data
anaconda.add_additional_repositories_to_ksdata()
diff -Nuar anaconda-33.16.5.6.old/anaconda.spec anaconda-33.16.5.6.new/anaconda.spec
--- anaconda-33.16.5.6.old/anaconda.spec 2021-09-24 20:38:53.000000000 +0800
+++ anaconda-33.16.5.6.new/anaconda.spec 2022-01-18 10:17:02.430260756 +0800
@@ -101,10 +101,6 @@
Requires: python3-productmd
Requires: python3-dasbus >= %{dasbusver}
Requires: flatpak-libs
-%if %{defined rhel} && %{undefined centos}
-Requires: python3-syspurpose
-Requires: subscription-manager >= 1.26
-%endif
# pwquality only "recommends" the dictionaries it needs to do anything useful,
# which is apparently great for containers but unhelpful for the rest of us
diff -Nuar anaconda-33.16.5.6.old/data/anaconda-gtk.css anaconda-33.16.5.6.new/data/anaconda-gtk.css
--- anaconda-33.16.5.6.old/data/anaconda-gtk.css 2021-09-24 20:36:01.000000000 +0800
+++ anaconda-33.16.5.6.new/data/anaconda-gtk.css 2022-01-18 10:17:29.738007497 +0800
@@ -158,26 +158,3 @@
where the look is constant. This reduces redraws significantly and saves the CPU. See rhbz#1204242
for measurements. */
spinner { animation-timing-function: steps(24); }
-
-/* Set colors for the subscriptions listbox:
- * - disable background color, so that the
- * list box looks good even if half empty
- * - disable border color as well
- * - only rows should have a distinct background
- */
-.subscriptions_listbox {
- background-color: transparent;
- background-image: none;
- border-color: transparent;
- border-image: none;
-}
-
-#subscriptions_listbox_row {
- background-color: white;
- border-color: gray;
-}
-
-#subscriptions_listbox_row_spacer {
- background-color: transparent;
- border-color: transparent;
-}
diff -Nuar anaconda-33.16.5.6.old/pyanaconda/modules/common/constants/namespaces.py anaconda-33.16.5.6.new/pyanaconda/modules/common/constants/namespaces.py
--- anaconda-33.16.5.6.old/pyanaconda/modules/common/constants/namespaces.py 2022-01-18 10:13:44.147099659 +0800
+++ anaconda-33.16.5.6.new/pyanaconda/modules/common/constants/namespaces.py 2022-01-18 10:17:52.970792034 +0800
@@ -81,11 +81,6 @@
"Services"
)
-SUBSCRIPTION_NAMESPACE = (
- *MODULES_NAMESPACE,
- "Subscription"
-)
-
PAYLOADS_NAMESPACE = (
*MODULES_NAMESPACE,
"Payloads"
diff -Nuar anaconda-33.16.5.6.old/pyanaconda/modules/common/constants/services.py anaconda-33.16.5.6.new/pyanaconda/modules/common/constants/services.py
--- anaconda-33.16.5.6.old/pyanaconda/modules/common/constants/services.py 2022-01-18 10:13:44.147099659 +0800
+++ anaconda-33.16.5.6.new/pyanaconda/modules/common/constants/services.py 2022-01-18 10:18:29.227455792 +0800
@@ -69,11 +69,6 @@
message_bus=DBus
)
-SUBSCRIPTION = DBusServiceIdentifier(
- namespace=SUBSCRIPTION_NAMESPACE,
- message_bus=DBus
-)
-
# System services.
HOSTNAME = DBusServiceIdentifier(
diff -Nuar anaconda-33.16.5.6.old/pyanaconda/modules/common/errors/installation.py anaconda-33.16.5.6.new/pyanaconda/modules/common/errors/installation.py
--- anaconda-33.16.5.6.old/pyanaconda/modules/common/errors/installation.py 2022-01-18 10:13:44.147099659 +0800
+++ anaconda-33.16.5.6.new/pyanaconda/modules/common/errors/installation.py 2022-01-18 10:19:00.915161920 +0800
@@ -73,15 +73,3 @@
class StorageInstallationError(InstallationError):
"""Exception for the storage installation errors."""
pass
-
-
-@dbus_error("InsightsClientMissingError", namespace=ANACONDA_NAMESPACE)
-class InsightsClientMissingError(InstallationError):
- """Exception for missing Red Hat Insights utility."""
- pass
-
-
-@dbus_error("InsightsConnectError", namespace=ANACONDA_NAMESPACE)
-class InsightsConnectError(InstallationError):
- """Exception for error when connecting to Red Hat Insights."""
- pass
\ No newline at end of file
diff -Nuar anaconda-33.16.5.6.old/pyanaconda/payload/manager.py anaconda-33.16.5.6.new/pyanaconda/payload/manager.py
--- anaconda-33.16.5.6.old/pyanaconda/payload/manager.py 2021-09-24 20:36:12.000000000 +0800
+++ anaconda-33.16.5.6.new/pyanaconda/payload/manager.py 2022-01-18 10:19:37.507822554 +0800
@@ -22,7 +22,7 @@
from dasbus.error import DBusError
from pyanaconda.core.constants import THREAD_STORAGE, THREAD_PAYLOAD, THREAD_PAYLOAD_RESTART, \
- THREAD_WAIT_FOR_CONNECTING_NM, THREAD_SUBSCRIPTION, PAYLOAD_TYPE_DNF, \
+ THREAD_WAIT_FOR_CONNECTING_NM, PAYLOAD_TYPE_DNF, \
THREAD_STORAGE_WATCHER, THREAD_EXECUTE_STORAGE
from pyanaconda.core.i18n import _, N_
from pyanaconda.threading import threadMgr, AnacondaThread
@@ -186,9 +186,6 @@
# (set and use payload.needs_network ?)
threadMgr.wait(THREAD_WAIT_FOR_CONNECTING_NM)
- # Wait for subscription
- threadMgr.wait(THREAD_SUBSCRIPTION)
-
payload.setup()
# If this is a non-package Payload, we're done
diff -Nuar anaconda-33.16.5.6.old/pyanaconda/ui/gui/spokes/installation_source.glade anaconda-33.16.5.6.new/pyanaconda/ui/gui/spokes/installation_source.glade
--- anaconda-33.16.5.6.old/pyanaconda/ui/gui/spokes/installation_source.glade 2022-01-18 10:13:44.148099650 +0800
+++ anaconda-33.16.5.6.new/pyanaconda/ui/gui/spokes/installation_source.glade 2022-01-18 10:22:35.364173096 +0800
@@ -631,13 +631,6 @@
</packing>
</child>
<child>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
<object class="GtkRadioButton" id="isoRadioButton">
<property name="label" translatable="yes" context="GUI|Software Source">_ISO file:</property>
<property name="can_focus">True</property>
@@ -652,7 +645,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
@@ -733,7 +726,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">6</property>
+ <property name="position">5</property>
</packing>
</child>
<child>
@@ -752,7 +745,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">7</property>
+ <property name="position">6</property>
</packing>
</child>
<child>
@@ -898,7 +891,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">8</property>
+ <property name="position">7</property>
</packing>
</child>
<child>
@@ -963,7 +956,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">9</property>
+ <property name="position">8</property>
</packing>
</child>
<child>
@@ -980,7 +973,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">10</property>
+ <property name="position">9</property>
</packing>
</child>
<child>
@@ -1319,7 +1312,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">11</property>
+ <property name="position">10</property>
</packing>
</child>
</object>
diff -Nuar anaconda-33.16.5.6.old/pyanaconda/ui/gui/spokes/installation_source.py anaconda-33.16.5.6.new/pyanaconda/ui/gui/spokes/installation_source.py
--- anaconda-33.16.5.6.old/pyanaconda/ui/gui/spokes/installation_source.py 2022-01-18 10:13:44.148099650 +0800
+++ anaconda-33.16.5.6.new/pyanaconda/ui/gui/spokes/installation_source.py 2022-01-18 10:24:17.249228189 +0800
@@ -452,11 +452,7 @@
source_proxy = self.payload.get_source_proxy()
source_type = source_proxy.Type
- if self._cdn_button.get_active():
- if source_type == SOURCE_TYPE_CDN:
- return False
- switch_source(self.payload, SOURCE_TYPE_CDN)
- elif self._autodetect_button.get_active():
+ if self._autodetect_button.get_active():
if not self._cdrom:
return False
@@ -668,7 +664,6 @@
self._autodetect_box = self.builder.get_object("autodetectBox")
self._autodetect_device_label = self.builder.get_object("autodetectDeviceLabel")
self._autodetect_label = self.builder.get_object("autodetectLabel")
- self._cdn_button = self.builder.get_object("cdnRadioButton")
self._hmc_button = self.builder.get_object("hmcRadioButton")
self._iso_button = self.builder.get_object("isoRadioButton")
self._iso_box = self.builder.get_object("isoBox")
@@ -740,7 +735,6 @@
# want to let me pass in user data.
# See also: https://bugzilla.gnome.org/show_bug.cgi?id=727919
self._autodetect_button.connect("toggled", self.on_source_toggled, self._autodetect_box)
- self._cdn_button.connect("toggled", self.on_source_toggled, None)
self._hmc_button.connect("toggled", self.on_source_toggled, None)
self._iso_button.connect("toggled", self.on_source_toggled, self._iso_box)
self._network_button.connect("toggled", self.on_source_toggled, self._network_box)
@@ -825,10 +819,6 @@
def _initialize(self):
threadMgr.wait(constants.THREAD_PAYLOAD)
- # If there is the Subscriptiopn DBus module, make the CDN radio button visible
- if is_module_available(SUBSCRIPTION):
- gtk_call_once(self._cdn_button.set_no_show_all, False)
-
# Get the current source.
source_proxy = self.payload.get_source_proxy()
source_type = source_proxy.Type
@@ -943,9 +933,7 @@
self._protocol_combo_box.set_active_id(PROTOCOL_MIRROR)
self._url_type_combo_box.set_active_id(URL_TYPE_BASEURL)
- if source_type == SOURCE_TYPE_CDN:
- self._cdn_button.set_active(True)
- elif source_type == SOURCE_TYPE_URL:
+ if source_type == SOURCE_TYPE_URL:
self._network_button.set_active(True)
# Get the current configuration.
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pang-qing/anaconda_4.git
git@gitee.com:pang-qing/anaconda_4.git
pang-qing
anaconda_4
anaconda_4
a8

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385