from fermiinstallclass import FermiInstallClass
import rhpl
from constants import *
from flags import flags
import os
import iutil
import types
import rpmUtils.arch

import logging
log = logging.getLogger("anaconda")


class InstallClass(FermiInstallClass):
    # name has underscore used for mnemonics, strip if you dont need it
    id = "fermigenericdesktopoffsite"
    pixmap = "workstation.png"
    name = ("FermiGenericDesktopOffsite Workgroup Install")
    description = ("If you are NOT onsite at Fermi and you are not part of a workkgroup."
                    "It allows for connection to Fermi via"
                    "kerberos but does not require kerberos for local login's.  "
                    "Thus it is only suitable for offsite")
                     
    sortPriority = 5

    def setInstallData(self, anaconda):
	FermiInstallClass.setInstallData(self, anaconda)

    def setGroupSelection(self, anaconda):
	FermiInstallClass.setGroupSelection(self, anaconda);
	anaconda.backend.selectGroup("core")
        anaconda.backend.selectGroup("base")
        anaconda.backend.selectGroup("fermigenericdesktopoffsite")
        anaconda.backend.selectGroup("admin-tools")
        anaconda.backend.selectGroup("base")
        anaconda.backend.selectGroup("base-x")
        anaconda.backend.selectGroup("dialup")
        anaconda.backend.selectGroup("editors")
        anaconda.backend.selectGroup("games")
        anaconda.backend.selectGroup("gnome-desktop")
        anaconda.backend.selectGroup("graphical-internet")
        anaconda.backend.selectGroup("graphics")
        anaconda.backend.selectGroup("kde-desktop")
        anaconda.backend.selectGroup("local-printer")
        anaconda.backend.selectGroup("multimedia")
        anaconda.backend.selectGroup("office")
        anaconda.backend.selectGroup("printing")
        anaconda.backend.selectGroup("sound-and-video")
        anaconda.backend.selectGroup("text-internet")
        anaconda.backend.selectPackage("SL_password_for_singleuser")
        anaconda.backend.deselectGroup("fermi")
        anaconda.backend.deselectGroup("clamav")
        anaconda.backend.deselectGroup("development-libs")
        anaconda.backend.deselectGroup("development-tools")
        anaconda.backend.deselectGroup("java")
        anaconda.backend.deselectGroup("kernel-development")
        anaconda.backend.deselectGroup("openafs-client")
        anaconda.backend.deselectGroup("openssh-server")
        anaconda.backend.deselectGroup("upsupdbootstrap")
        anaconda.backend.deselectGroup("workstation")
        anaconda.backend.deselectPackage("openssh-server")
        anaconda.backend.deselectPackage("nmap")
        anaconda.backend.deselectPackage("pcsc-lite")
        anaconda.backend.deselectPackage("pcsc-lite-libs")
        anaconda.backend.deselectPackage("ccid")
        anaconda.backend.deselectPackage("coolkey")
        anaconda.backend.deselectPackage("ifd-egate")

    def setSteps(self, dispatch):
	FermiInstallClass.setSteps(self, dispatch);
#	dispatch.skipStep("partition")
  	dispatch.skipStep("tasksel")
  	dispatch.skipStep("group-selection", skip = 0)
	dispatch.skipStep("confirminstall", skip = 1)

    def __init__(self, expert):
	FermiInstallClass.__init__(self, expert)
        self.repopaths["workgroup"] = "%s/workgroups/FermiGenericDesktopOffsite" %(productPath,)
