summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2006-08-30 21:59:39 +0000
committerChris Lumens <clumens@redhat.com>2006-08-30 21:59:39 +0000
commit4330dde3ceeda51bb403b307c3a446f132504b24 (patch)
treea22ab40cd64c32dc90d76b416af3779ea8aefb7f /iw
parentd9a7c3f0ccbae23d7f9417595a3f88474b31d7c3 (diff)
downloadanaconda-4330dde3ceeda51bb403b307c3a446f132504b24.tar.gz
anaconda-4330dde3ceeda51bb403b307c3a446f132504b24.tar.xz
anaconda-4330dde3ceeda51bb403b307c3a446f132504b24.zip
Add new repos to the installclass's list so they appear when going back to this
screen. Setup repos as soon as they are added to catch errors, but setup installclass default repos when next is clicked so they are ready for use.
Diffstat (limited to 'iw')
-rw-r--r--iw/task_gui.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/iw/task_gui.py b/iw/task_gui.py
index c42405cb2..d302ad2e8 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -42,7 +42,11 @@ class TaskWindow(InstallWindow):
for (cb, reponame, repo) in repos:
if cb:
repo.enable()
- self._setupRepo(repo)
+
+ # Setup any repositories that were in the installclass's
+ # default list.
+ if not repo.ready():
+ self._setupRepo(repo)
else:
repo.disable()
@@ -77,7 +81,7 @@ class TaskWindow(InstallWindow):
"correctly generated.\n\n%s" %(e,)),
type="ok", custom_icon="error")
self.backend.ayum.repos.delete(repo.id)
- return
+ return False
if not repo.groups_added:
self.intf.messageWindow(_("Warning"),
@@ -86,6 +90,8 @@ class TaskWindow(InstallWindow):
"from the repository not work") %(repo.id,),
type="warning")
+ return True
+
def _addRepo(self, *args):
# FIXME: Need to bring up the network
if not network.hasActiveNetDev():
@@ -142,8 +148,12 @@ class TaskWindow(InstallWindow):
"URL.") % reponame, type="ok", custom_icon="error")
continue
+ if not self._setupRepo(repo):
+ continue
+
s = self.xml.get_widget("repoList").get_model()
s.append([repo.isEnabled(), repo.name, repo])
+ self.repos[repo.name] = (repo.baseurl[0], None)
break