Re: [PATCH] (take II - extended) Enable network if it is needed when repo is added in UI (#577803).

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

 



Ack.

On 03/30/2010 12:25 PM, Radek Vykydal wrote:
In this version of patch, I added nfs case handling (2nd chunk) to
https://www.redhat.com/archives/anaconda-devel-list/2010-March/msg00450.html
that Hans has just acked. The message is an already existing string.

Network has to be enabled before setting the repo up so that repo metadata can
be checked (http/ftp case) or even before nfs filesystem is mounted (nfs case).

The bug is regarding the cases where network has not been anabled yet and user
is adding network-requiring repo, or modifying non-net-requiring repo to a
requiring one (e.g. DVD install ->  http install).

It can be worked around (apart from restarting install with ks, or something
that would bring up network earlier) by canceling the dialog, and checking or
modifying existing (*if there is any*) network requiring repo which would bring
up network enablement dialog.

I think the patch should go to master, rhel6-branch, and I'd also propose it
as f13 blocker.

---
  iw/task_gui.py |   19 +++++++++++++------
  1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/iw/task_gui.py b/iw/task_gui.py
index 0a18da8..8f61eea 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -42,6 +42,10 @@ import logging
  log = logging.getLogger("anaconda")

  def setupRepo(anaconda, repo):
+    if repo.needsNetwork() and not network.hasActiveNetDev():
+        if not anaconda.intf.enableNetwork():
+            return False
+        urlgrabber.grabber.reset_curl_obj()
      try:
          anaconda.backend.doRepoSetup(anaconda, thisrepo=repo.id, fatalerrors=False)
          anaconda.backend.doSackSetup(anaconda, thisrepo=repo.id, fatalerrors=False)
@@ -313,6 +317,15 @@ class RepoEditor:
                                      _("Please enter an NFS server and path."))
              return False

+        if not network.hasActiveNetDev():
+            if not self.anaconda.intf.enableNetwork():
+                self.intf.messageWindow(_("No Network Available"),
+                    _("Some of your software repositories require "
+                      "networking, but there was an error enabling the "
+                      "network on your system."))
+                return False
+            urlgrabber.grabber.reset_curl_obj()
+
          import tempfile
          dest = tempfile.mkdtemp("", repo.name.replace(" ", ""), "/mnt")

@@ -537,12 +550,6 @@ class TaskWindow(InstallWindow):
          if dialog.run() in [gtk.RESPONSE_CANCEL, gtk.RESPONSE_DELETE_EVENT]:
              return gtk.RESPONSE_CANCEL

-        if dialog.repo.needsNetwork() and not network.hasActiveNetDev():
-            if not self.anaconda.intf.enableNetwork():
-                return gtk.RESPONSE_CANCEL
-
-            urlgrabber.grabber.reset_curl_obj()
-
          s = self.xml.get_widget("repoList").get_model()
          s.append([dialog.repo.isEnabled(), dialog.repo.name, dialog.repo])


_______________________________________________
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