summaryrefslogtreecommitdiffstats
path: root/installclasses
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-09-22 10:39:42 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-09-22 13:03:21 -1000
commit013ddea862a75ed5841981b8c92dd85c5d0cb0ae (patch)
tree67fd52c1ea5bc7a6357cc4d14cc29d93e8032379 /installclasses
parent4544722923a5fbe64392e5a34fd6e1441a913575 (diff)
downloadanaconda-013ddea862a75ed5841981b8c92dd85c5d0cb0ae.tar.gz
anaconda-013ddea862a75ed5841981b8c92dd85c5d0cb0ae.tar.xz
anaconda-013ddea862a75ed5841981b8c92dd85c5d0cb0ae.zip
Modify rhel.py installclass for current RHEL development efforts.
Change the tasklist in the rhel.py installclass to align with current RHEL development.
Diffstat (limited to 'installclasses')
-rw-r--r--installclasses/rhel.py178
1 files changed, 54 insertions, 124 deletions
diff --git a/installclasses/rhel.py b/installclasses/rhel.py
index 906189dc8..0a632c58e 100644
--- a/installclasses/rhel.py
+++ b/installclasses/rhel.py
@@ -23,27 +23,22 @@ from product import *
from meh.filer import *
from flags import flags
import os
-import iutil
import types
-import yuminstall
-try:
- import instnum
-except ImportError:
- instnum = None
+import iutil
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
-import logging
-log = logging.getLogger("anaconda")
+import installmethod
+import yuminstall
+
+import rpmUtils.arch
-# custom installs are easy :-)
class InstallClass(BaseInstallClass):
# name has underscore used for mnemonics, strip if you dont need it
id = "rhel"
name = N_("Red Hat Enterprise Linux")
- _description = N_("The default installation of %s includes a set of "
- "software applicable for general internet usage. "
+ _description = N_("The default installation of %s is a minimal install. "
"What additional tasks would you like your system "
"to include support for?")
_descriptionFields = (productName,)
@@ -51,38 +46,53 @@ class InstallClass(BaseInstallClass):
if not productName.startswith("Red Hat Enterprise"):
hidden = 1
- taskMap = {'client' : [(N_("Office"), ["office"]),
- (N_("Multimedia"), ["graphics",
- "sound-and-video"])],
- 'server' : [(N_("Software Development"),
- ["development-libs", "development-tools",
- "gnome-software-development",
- "x-software-development"],),
- (N_("Web server"), ["web-server"])],
- 'workstation' : [(N_("Software Development"),
- ["development-libs", "development-tools",
- "gnome-software-development",
- "x-software-development"],)],
- 'vt' : [(N_("Virtualization"), ["virtualization"])],
- 'cluster' : [(N_("Clustering"), ["clustering"])],
- 'clusterstorage': [(N_("Storage Clustering"),
- ["cluster-storage"])]
- }
-
- instkeyname = N_("Installation Number")
- instkeydesc = N_("Would you like to enter an Installation Number "
- "(sometimes called Subscription Number) now? This feature "
- "enables the installer to access any extra components "
- "included with your subscription. If you skip this step, "
- "additional components can be installed manually later.\n\n"
- "See http://www.redhat.com/InstNum/ for more information.")
- skipkeytext = N_("If you cannot locate the Installation Number, consult "
- "http://www.redhat.com/InstNum/")
+ tasks = [(N_("Desktop"),
+ ["backup-client", "base", "compat-libraries", "console-internet",
+ "debugging", "directory-client", "firmware", "fonts",
+ "legacy-unix", "core", "network-file-system-client",
+ "network-tools", "print-client", "virtualization", "vpn",
+ "basic-desktop", "desktop-debugging", "desktop-platform",
+ "general-desktop", "graphical-admin-tools", "input-methods",
+ "legacy-x", "x11","office-suite", "graphics",
+ "virtualization-client"]),
+ (N_("Software Development"),
+ ["backup-client", "base", "compat-libraries", "console-internet",
+ "debugging", "directory-client", "firmware", "fonts",
+ "legacy-unix", "core", "network-file-system-client",
+ "network-tools", "print-client", "virtualization", "vpn",
+ "basic-desktop", "desktop-debugging", "desktop-platform",
+ "general-desktop", "graphical-admin-tools", "input-methods",
+ "legacy-x", "x11", "virtualization-client", "emacs", "tex",
+ "desktop-platform-devel", "development", "eclipse",
+ "server-platform-devel", "technical-writing"]),
+ (N_("Web Server"),
+ ["backup-client", "base", "compat-libraries", "console-internet",
+ "debugging", "directory-client", "firmware", "legacy-unix",
+ "core", "network-file-system-client", "network-tools",
+ "web-server", "additional-web-server", "server-platform",
+ "mysql", "php", "postgresql", "rails", "turbogears",
+ "system-admin-tools"]),
+ (N_("Advanced Server"),
+ ["backup-client", "base", "compat-libraries", "console-internet",
+ "debugging", "directory-client", "firmware", "legacy-unix",
+ "core", "network-file-system-client", "network-tools",
+ "web-server", "additional-web-server", "server-platform",
+ "mysql", "php", "postgresql", "rails", "turbogears",
+ "cifs-file-server", "clustering", "clustered-storage",
+ "directory-server", "mail-server", "ftp-server",
+ "network-server", "nfs-file-server", "print-server",
+ "system-admin-tools"])]
bugFiler = BugzillaFiler("https://bugzilla.redhat.com/xmlrpc.cgi",
"https://bugzilla.redhat.com/",
product.productVersion, product.productName)
+ def getPackagePaths(self, uri):
+ if not type(uri) == types.ListType:
+ uri = [uri,]
+
+ return {'Installation Repo': uri}
+
def setInstallData(self, anaconda):
BaseInstallClass.setInstallData(self, anaconda)
BaseInstallClass.setDefaultPartitioning(self,
@@ -92,87 +102,13 @@ class InstallClass(BaseInstallClass):
def setSteps(self, anaconda):
BaseInstallClass.setSteps(self, anaconda)
anaconda.dispatch.skipStep("partition")
- anaconda.dispatch.skipStep("regkey", skip = 0)
-
- # for rhel, we're putting the metadata under productpath
- def getPackagePaths(self, uri):
- rc = {}
- for (name, path) in self.repopaths.items():
- if not type(uri) == types.ListType:
- uri = [uri,]
- if not type(path) == types.ListType:
- path = [path,]
-
- lst = []
- for i in uri:
- for p in path:
- lst.append("%s/%s" % (i, p))
-
- rc[name] = lst
-
- log.info("package paths is %s" %(rc,))
- return rc
-
- def handleRegKey(self, key, intf, interactive = True):
- self.repopaths = { "base": "%s" %(productPath,) }
- self.tasks = self.taskMap[productPath.lower()]
- self.installkey = key
-
- try:
- inum = instnum.InstNum(key)
- except Exception, e:
- if True or not BETANAG: # disable hack keys for non-beta
- # make sure the log is consistent
- log.info("repopaths is %s" %(self.repopaths,))
- raise
- else:
- inum = None
-
- if inum is not None:
- # make sure the base products match
- if inum.get_product_string().lower() != productPath.lower():
- raise ValueError, "Installation number incompatible with media"
-
- for name, path in inum.get_repos_dict().items():
- # virt is only supported on i386/x86_64. so, let's nuke it
- # from our repo list on other arches unless you boot with
- # 'linux debug'
- if name.lower() == "virt" and \
- (not iutil.isX86() and not flags.debug):
- continue
- self.repopaths[name.lower()] = path
- log.info("Adding %s repo" % (name,))
-
- else:
- key = key.upper()
- # simple and stupid for now... if C is in the key, add Clustering
- # if V is in the key, add Virtualization. etc
- if key.find("C") != -1:
- self.repopaths["cluster"] = "Cluster"
- log.info("Adding Cluster option")
- if key.find("S") != -1:
- self.repopaths["clusterstorage"] = "ClusterStorage"
- log.info("Adding ClusterStorage option")
- if key.find("W") != -1:
- self.repopaths["workstation"] = "Workstation"
- log.info("Adding Workstation option")
- if key.find("V") != -1:
- self.repopaths["virt"] = "VT"
- log.info("Adding Virtualization option")
-
- for repo in self.repopaths.values():
- if not self.taskMap.has_key(repo.lower()):
- continue
-
- for task in self.taskMap[repo.lower()]:
- if task not in self.tasks:
- self.tasks.append(task)
- self.tasks.sort()
-
- log.info("repopaths is %s" %(self.repopaths,))
def getBackend(self):
- return yuminstall.YumBackend
+ if flags.livecdInstall:
+ import livecd
+ return livecd.LiveCDCopyBackend
+ else:
+ return yuminstall.YumBackend
def productMatches(self, oldprod):
if oldprod is None:
@@ -214,10 +150,4 @@ class InstallClass(BaseInstallClass):
return True
def __init__(self):
- BaseInstallClass.__init__(self)
-
- self.repopaths = { "base": "%s" %(productPath,) }
-
- # minimally set up tasks in case no key is provided
- self.tasks = self.taskMap[productPath.lower()]
-
+ BaseInstallClass.__init__(self)