[rhel6-branch][PATCH] Check if selected repos have the core package group (#901515)

Martin Kolman mkolman at redhat.com
Mon Jul 15 18:26:06 UTC 2013


Check if the selected repositories contain the "core" package group,
which is a requirement for successful installation.
If the core group is not available, show warning dialog if next is clicked.
If core is available, let the installation proceed as usual.

Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
 iw/task_gui.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/iw/task_gui.py b/iw/task_gui.py
index dc574d7..5cacc67 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -523,6 +523,14 @@ class TaskWindow(InstallWindow):
         # through the UI.
         self.backend.ayum.comps = None
 
+        # check if the selected repositories contain the core package group,
+        # which is required for installation
+        if not self.backend.ayum.comps.has_group("core"):
+            self.anaconda.intf.messageWindow(_("Core group missing in selected repos"),
+            _("You must select at least one software repository containing the"
+              " core package group."))
+            raise gui.StayOnScreen
+
         tasks = self.xml.get_widget("taskList").get_model()
         for (cb, task, grps) in filter(lambda x: not x[0], tasks):
             map(lambda g: setattr(self.backend.ayum.comps.return_group(g),
-- 
1.8.3.1



More information about the anaconda-patches mailing list