summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2010-02-19 16:02:21 -0500
committerChris Lumens <clumens@redhat.com>2010-02-22 12:53:42 -0500
commita635024db01d52b7bd0cb9d4ec34863c39feb621 (patch)
treeda5295ae2ebe947a8fb37be23ce2e7dab30369f2
parent0ed3a4d77176c5aad25f9da487eb8f70a9e9112f (diff)
downloadanaconda-a635024db01d52b7bd0cb9d4ec34863c39feb621.tar.gz
anaconda-a635024db01d52b7bd0cb9d4ec34863c39feb621.tar.xz
anaconda-a635024db01d52b7bd0cb9d4ec34863c39feb621.zip
Remove a couple redundant network bring up calls.
At least, I believe these are redundant and likely unreachable. I don't think there's a way to get to these places on a network install without any network active. These calls have all the marks of desperation to cover th bases without thinking about whether they're even valid or not.
-rw-r--r--yuminstall.py39
1 files changed, 13 insertions, 26 deletions
diff --git a/yuminstall.py b/yuminstall.py
index 9d7060059..0d773f759 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -786,13 +786,6 @@ class AnacondaYum(YumSorter):
buttons = [_("Re_boot"), _("_Retry")]
pkgFile = to_unicode(os.path.basename(package.remote_path))
-
- if package.repo.needsNetwork() and not network.hasActiveNetDev():
- if not self.anaconda.intf.enableNetwork():
- return
-
- urlgrabber.grabber.reset_curl_obj()
-
rc = self.anaconda.intf.messageWindow(_("Error"),
_("The file %s cannot be opened. This is due to a missing "
"file, a corrupt package or corrupt media. Please "
@@ -1150,18 +1143,19 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
# If any enabled repositories require networking, go ahead and bring
# it up now. No need to have people wait for the timeout when we
# know this in advance.
- if len(filter(lambda r: r.needsNetwork(), self.ayum.repos.listEnabled())) > 0 and \
- not network.hasActiveNetDev():
- if not anaconda.intf.enableNetwork():
- anaconda.intf.messageWindow(_("No Network Available"),
- _("Some of your software repositories require "
- "networking, but there was an error enabling the "
- "network on your system."),
- type="custom", custom_icon="error",
- custom_buttons=[_("_Exit installer")])
- sys.exit(1)
-
- urlgrabber.grabber.reset_curl_obj()
+ for repo in self.ayum.repos.listEnabled():
+ if repo.needsNetwork() and not network.hasActiveNetDev():
+ if not anaconda.intf.enableNetwork():
+ anaconda.intf.messageWindow(_("No Network Available"),
+ _("Some of your software repositories require "
+ "networking, but there was an error enabling the "
+ "network on your system."),
+ type="custom", custom_icon="error",
+ custom_buttons=[_("_Exit installer")])
+ sys.exit(1)
+
+ urlgrabber.grabber.reset_curl_obj()
+ break
self.doRepoSetup(anaconda)
self.doSackSetup(anaconda)
@@ -1238,13 +1232,6 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
waitwin.pop()
except RepoError, e:
waitwin.pop()
- if repo.needsNetwork() and not network.hasActiveNetDev():
- if anaconda.intf.enableNetwork():
- repo.mirrorlistparsed = False
- continue
-
- urlgrabber.grabber.reset_curl_obj()
-
buttons = [_("_Exit installer"), _("Edit"), _("_Retry")]
else:
break # success