summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgui.py6
-rw-r--r--iw/task_gui.py6
-rw-r--r--text.py4
-rw-r--r--ui/addrepo.glade2
-rw-r--r--yuminstall.py34
5 files changed, 33 insertions, 19 deletions
diff --git a/gui.py b/gui.py
index dd2b8227b..492b4a004 100755
--- a/gui.py
+++ b/gui.py
@@ -1110,6 +1110,12 @@ class InstallInterface:
custom_buttons, custom_icon, run=True, parent=parent).getrc()
return rc
+ def editRepoWindow(self, anaconda, repoObj):
+ from task_gui import RepoEditor
+ dialog = RepoEditor(anaconda, repoObj)
+ dialog.createDialog()
+ dialog.run()
+
def entryWindow(self, title, text, type="ok", entrylength = None):
d = EntryWindow(title, text, type, entrylength)
rc = d.run()
diff --git a/iw/task_gui.py b/iw/task_gui.py
index 7779183b9..753679ac8 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -46,7 +46,7 @@ def setupRepo(anaconda, repo):
"Please ensure that your repository has been "
"correctly generated.\n\n%s" %(e,)),
type="ok", custom_icon="error")
- anaconda.backend.ayum.repos.delete(self.repo.id)
+ anaconda.backend.ayum.repos.delete(repo.id)
return False
if not repo.groups_added:
@@ -77,6 +77,8 @@ class RepoEditor:
self.usernameEntry = self.dxml.get_widget("usernameEntry")
self.passwordEntry = self.dxml.get_widget("passwordEntry")
+ self.dialog.set_title(_("Edit Repository"))
+
def _enableRepo(self, repourl):
# Only do this for the real base repo, as that's what will get
# written out to anaconda-ks.cfg as the method.
@@ -137,7 +139,7 @@ class RepoEditor:
lbl = self.dxml.get_widget("descLabel")
txt = lbl.get_text()
- lbl.set_text(txt %(productName,))
+ lbl.set_text(txt)
self.dialog.show_all()
diff --git a/text.py b/text.py
index 652141e15..92797565e 100644
--- a/text.py
+++ b/text.py
@@ -440,6 +440,10 @@ class InstallInterface:
return self.messageWindow(title, text, type, default, custom_icon,
custom_buttons)
+ def editRepoWindow(self, anaconda, repoObj):
+ self.messageWindow(_("Error"),
+ _("Repository editing is not available in text mode."))
+
def entryWindow(self, title, text, prompt, entrylength = None):
(res, value) = EntryWindow(self.screen, title, text, [prompt])
if res == "cancel":
diff --git a/ui/addrepo.glade b/ui/addrepo.glade
index 0317700c8..e946dcaf2 100644
--- a/ui/addrepo.glade
+++ b/ui/addrepo.glade
@@ -72,7 +72,7 @@
<child>
<widget class="GtkLabel" id="descLabel">
<property name="visible">True</property>
- <property name="label" translatable="yes" context="yes">Please provide the location where your additional software can be installed from. Note that this must be a valid repository for %s.</property>
+ <property name="label" translatable="yes" context="yes">Please provide the location where your additional software can be installed from.</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
diff --git a/yuminstall.py b/yuminstall.py
index 9b591e9d6..f4ba51da7 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -889,10 +889,8 @@ class YumBackend(AnacondaBackend):
task(thisrepo = repo.id)
waitwin.next_task()
waitwin.pop()
- except yum.Errors.NoMoreMirrorsRepoError, e:
- buttons = [_("_Abort"), _("_Retry")]
- except yum.Errors.RepoError, e:
- buttons = [_("_Abort")]
+ except Exception, e:
+ buttons = [_("_Exit installer"), "gtk-edit", _("_Retry")]
else:
break # success
@@ -907,16 +905,22 @@ class YumBackend(AnacondaBackend):
_("Unable to read package metadata. This may be "
"due to a missing repodata directory. Please "
"ensure that your install tree has been "
- "correctly generated. %s" % e),
+ "correctly generated.\n\n%s" % e),
type="custom", custom_icon="error",
custom_buttons=buttons)
if rc == 0:
+ # abort
sys.exit(0)
+ elif rc == 1:
+ # edit
+ anaconda.intf.editRepoWindow(anaconda, repo)
elif rc == 2:
+ # retry, but only if button is present
+ continue
+ else:
+ # continue, but only if button is present
self.ayum.repos.delete(repo.id)
break
- else:
- continue
# if we're in kickstart the repo may have been deleted just above
try:
@@ -933,10 +937,8 @@ class YumBackend(AnacondaBackend):
while 1:
try:
self.doGroupSetup()
- except yum.Errors.NoMoreMirrorsRepoError:
- buttons = [_("Re_boot"), _("_Retry")]
- except (yum.Errors.GroupsError, yum.Errors.RepoError):
- buttons = [_("Re_boot")]
+ except Exception, e:
+ buttons = [_("_Exit installer"), _("_Retry")]
else:
break # success
@@ -1167,10 +1169,8 @@ class YumBackend(AnacondaBackend):
while 1:
try:
(code, msgs) = self.ayum.buildTransaction()
- except yum.Errors.NoMoreMirrorsRepoError, e:
- buttons = [_("Re_boot"), _("_Retry")]
- except RepoError, e:
- buttons = [_("Re_boot")]
+ except Exception, e:
+ buttons = [_("_Exit installer"), "gtk-edit", _("_Retry")]
else:
break
@@ -1179,11 +1179,13 @@ class YumBackend(AnacondaBackend):
_("Unable to read package metadata. This may be "
"due to a missing repodata directory. Please "
"ensure that your install tree has been "
- "correctly generated. %s" % e),
+ "correctly generated.\n\n%s" % e),
type="custom", custom_icon="error",
custom_buttons=buttons)
if rc == 0:
sys.exit(0)
+ elif rc == 1:
+ anaconda.intf.editRepoWindow(anaconda, repo)
else:
continue