Linux Archive

Linux Archive (
-   Debian Development (
-   -   (take II - extended) Enable network if it is needed when repo is added in UI (#577803). (

Hans de Goede 03-30-2010 10:32 AM

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

On 03/30/2010 12:25 PM, Radek Vykydal wrote:

In this version of patch, I added nfs case handling (2nd chunk) to
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/ | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/iw/ b/iw/
index 0a18da8..8f61eea 100644
--- a/iw/
+++ b/iw/
@@ -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()
anaconda.backend.doRepoSetup(anaconda,, fatalerrors=False)
anaconda.backend.doSackSetup(anaconda,, 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(""," ", ""), "/mnt")

@@ -537,12 +550,6 @@ class TaskWindow(InstallWindow):

- 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])

Anaconda-devel-list mailing list

All times are GMT. The time now is 03:13 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.