[PATCH 5/6] Fix up the source spoke apply method for some cases.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Switching from a configured base repo to using the closest mirror
needs to disable the previously-configured base repo.

Any change of base repo requires a call to updateBaseRepo.

Never fully reset ksdata.method. Instead, unset method.method to
disable it while retaining the details in method's url, &c attrs.
---
 pyanaconda/packaging/yumpayload.py |    3 ++-
 pyanaconda/ui/gui/spokes/source.py |    7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 69c4e4e..c7ae3ad 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -220,7 +220,8 @@ reposdir=/etc/yum.repos.d,/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/t
                 self.release()
                 raise
 
-            self._resetMethod()
+            # this preserves the method details while disabling it
+            self.data.method.method = None
 
         if BASE_REPO_NAME not in self._yum.repos.repos.keys():
             log.info("using default repos from local yum configuration")
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index 787d715..32991fc 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -260,7 +260,8 @@ class SourceSpoke(NormalSpoke):
             self.data.method.partition = part.name
             self.data.method.dir = self._currentIsoFile
         elif self._mirror_active():
-            pass
+            # this preserves the url for later editing
+            self.data.method.method = None
         elif self._http_active() or self._ftp_active():
             url = self._urlEntry.get_text().strip()
 
@@ -294,6 +295,8 @@ class SourceSpoke(NormalSpoke):
             (self.data.method.server, self.data.method.dir) = url.split(":", 2)
             self.data.method.opts = self.builder.get_object("nfsOptsEntry").get_text() or ""
 
+        self.payload.updateBaseRepo(self.storage)
+
     @property
     def completed(self):
         return self.status and self.status != _("Nothing selected")
@@ -463,6 +466,8 @@ class SourceSpoke(NormalSpoke):
             else:
                 self._networkButton.set_active(True)
 
+        # TODO: handle noUpdatesCheckbox
+
         # Then, some widgets get enabled/disabled/greyed out depending on
         # how others are set up.  We can use the signal handlers to handle
         # that condition here too.
-- 
1.7.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux