summaryrefslogtreecommitdiffstats
path: root/textw/task_text.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-11-18 17:25:10 -0500
committerChris Lumens <clumens@redhat.com>2009-02-09 11:30:09 -0500
commit31607bb4e26957ad89fff96d0c35942b8e847356 (patch)
tree57c2b286d4c2937f475294b82046b682e597c469 /textw/task_text.py
parent0a84b4c1d2528eb699598d1207ce2979d81f1bb4 (diff)
downloadanaconda-31607bb4e26957ad89fff96d0c35942b8e847356.tar.gz
anaconda-31607bb4e26957ad89fff96d0c35942b8e847356.tar.xz
anaconda-31607bb4e26957ad89fff96d0c35942b8e847356.zip
Reduce package selection down to automatically installing Base and Core.
There is no more interactive group/package selection in text mode.
Diffstat (limited to 'textw/task_text.py')
-rw-r--r--textw/task_text.py67
1 files changed, 5 insertions, 62 deletions
diff --git a/textw/task_text.py b/textw/task_text.py
index 0c062685e..94afce651 100644
--- a/textw/task_text.py
+++ b/textw/task_text.py
@@ -17,73 +17,16 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from snack import *
from constants_text import *
from constants import *
-import gettext
-_ = lambda x: gettext.ldgettext("anaconda", x)
-
class TaskWindow:
- def groupsExist(self, lst):
- # FIXME: yum specific
- for gid in lst:
- g = self.backend.ayum.comps.return_group(gid)
- if not g:
- return False
- return True
-
def __call__(self, screen, anaconda):
- self.backend = anaconda.backend
- tasks = anaconda.id.instClass.tasks
-
- bb = ButtonBar (screen, (TEXT_OK_BUTTON, TEXT_BACK_BUTTON))
-
- toplevel = GridFormHelp (screen, _("Package selection"),
- "tasksel", 1, 5)
-
- if anaconda.id.instClass.description:
- labeltxt = anaconda.id.instClass.description
- else:
- labeltxt = _("The default installation of %s includes a set of software applicable for general internet usage. What additional tasks would you like your system to support?") %(productName,)
- toplevel.add (TextboxReflowed(55, labeltxt), 0, 0, (0, 0, 0, 1))
-
- ct = CheckboxTree(height = 4, scroll = (len(tasks) > 4))
- for (txt, grps) in tasks:
- if not self.backend.groupListExists(grps):
- continue
-
- if self.backend.groupListDefault(grps):
- ct.append(_(txt), txt, True)
- else:
- ct.append(_(txt), txt, False)
- toplevel.add (ct, 0, 2, (0,0,0,1))
-
- custom = not anaconda.dispatch.stepInSkipList("group-selection")
- customize = Checkbox (_("Customize software selection"), custom)
- toplevel.add (customize, 0, 3, (0, 0, 0, 1))
- toplevel.add (bb, 0, 4, (0, 0, 0, 0), growx = 1)
+ anaconda.dispatch.skipStep("basepkgsel")
+ anaconda.dispatch.skipStep("group-selection")
- result = toplevel.run()
- rc = bb.buttonPressed (result)
- if rc == TEXT_BACK_CHECK:
- screen.popWindow()
- return INSTALL_BACK
+ anaconda.backend.resetPackageSelections()
+ anaconda.backend.selectGroup("Core")
+ anaconda.backend.selectGroup("Base")
- if customize.selected():
- anaconda.dispatch.skipStep("group-selection", skip = 0)
- else:
- anaconda.dispatch.skipStep("group-selection")
-
- sel = ct.getSelection()
- for (txt, grps) in tasks:
- if txt in sel:
- map(lambda g: setattr(self.backend.ayum.comps.return_group(g),
- "default", True), grps)
- else:
- map(lambda g: setattr(self.backend.ayum.comps.return_group(g),
- "default", False), grps)
- screen.popWindow()
-
return INSTALL_OK
-