[master][PATCH] Don't allow usaging updates with non-default network sources (#1008028)

Vratislav Podzimek vpodzime at redhat.com
Mon Sep 23 17:25:08 UTC 2013


Otherwise we don't know which repository if the one with updates.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/ui/gui/spokes/source.py | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index bc72564..27ffd90 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -545,6 +545,9 @@ class SourceSpoke(NormalSpoke):
         # updates option container
         self._updatesBox = self.builder.get_object("updatesBox")
 
+        self._proxyButton = self.builder.get_object("proxyButton")
+        self._nfsOptsBox = self.builder.get_object("nfsOptsBox")
+
     def initialize(self):
         NormalSpoke.initialize(self)
 
@@ -753,6 +756,15 @@ class SourceSpoke(NormalSpoke):
         enabled = button.get_active()
         relatedBox.set_sensitive(enabled)
 
+        if button in (self._autodetectButton, self._isoButton):
+            # just make updates check box sensitive and unchecked by default
+            self._noUpdatesCheckbox.set_active(False)
+            self._updatesBox.set_sensitive(True)
+        else:
+            # network source selected, setup updates check box based on protocol
+            # chosen
+            self._protocolComboBox.emit("changed")
+
     def on_chooser_clicked(self, button):
         dialog = IsoChooser(self.data)
 
@@ -814,19 +826,21 @@ class SourceSpoke(NormalSpoke):
             dialog.run("/dev/" + self._cdrom.name)
 
     def on_protocol_changed(self, combo):
-        proxyButton = self.builder.get_object("proxyButton")
-        nfsOptsBox = self.builder.get_object("nfsOptsBox")
-
         # Only allow the URL entry to be used if we're using an HTTP/FTP
         # method that's not the mirror list, or an NFS method.
         self._urlEntry.set_sensitive(self._http_active() or self._ftp_active() or self._nfs_active())
 
         # Only allow thse widgets to be shown if it makes sense for the
         # the currently selected protocol.
-        proxyButton.set_sensitive(self._http_active() or self._mirror_active())
-        nfsOptsBox.set_visible(self._nfs_active())
+        self._proxyButton.set_sensitive(self._http_active() or self._mirror_active())
+        self._nfsOptsBox.set_visible(self._nfs_active())
         self._mirrorlistCheckbox.set_visible(self._http_active())
 
+        # We only know how to enable updates if the default mirror is used.
+        # don't disable updates by default
+        self._noUpdatesCheckbox.set_active(not self._mirror_active())
+        self._updatesBox.set_sensitive(self._mirror_active())
+
     def _update_payload_repos(self):
         """ Change the packaging repos to match the new edits
 
-- 
1.7.11.7



More information about the anaconda-patches mailing list