1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
from installclass import BaseInstallClass
from rhpl.translate import N_
from constants import *
import os
import iutil
# custom installs are easy :-)
class InstallClass(BaseInstallClass):
# name has underscore used for mnemonics, strip if you dont need it
id = "custom"
name = N_("Red Hat Enterprise Linux")
pixmap = "custom.png"
description = N_("Select this installation type to gain complete "
"control over the installation process, including "
"software package selection and partitioning.")
sortPriority = 10000
showLoginChoice = 1
showMinimal = 1
if not productName.startswith("Red Hat Enterprise"):
hidden = 1
tasks = [(N_("Office and Productivity"), ["graphics", "office", "games", "sound-and-video"]),
(N_("Software Development"), ["development-libs", "development-tools", "gnome-software-development", "x-software-development"],),
(N_("Web server"), ["web-server"])]
def setInstallData(self, anaconda):
BaseInstallClass.setInstallData(self, anaconda)
BaseInstallClass.setDefaultPartitioning(self, anaconda.id.partitions,
CLEARPART_TYPE_LINUX)
def setGroupSelection(self, anaconda):
grps = anaconda.backend.getDefaultGroups()
map(lambda x: anaconda.backend.selectGroup(x), grps)
def setSteps(self, dispatch):
BaseInstallClass.setSteps(self, dispatch);
dispatch.skipStep("partition")
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():
rc[name] = "%s/%s" %(uri, path)
return rc
def handleRegKey(self, key, intf):
if key is None or len(key) == 0:
intf.messageWindow(_("Registration Key Required"),
_("A registration key is required to "
"install %s. Please contact your support "
"representative if you did not receive a "
"key with your product." %(productName,)),
type = "ok", custom_icon="error")
raise NoKeyError
# simple and stupid for now... if C is in the key, add Clustering
# if V is in the key, add Virtualization.
if key.find("C") != -1:
self.repopaths["cluster"] = "Cluster"
if key.find("S") != -1:
self.repopaths["cs"] = "ClusterStorage"
if key.find("V") != -1:
self.repopaths["virt"] = "VT"
if key.find("D") != -1:
self.repopaths["desktop"] = "Desktop"
self.regkey = key
def __init__(self, expert):
BaseInstallClass.__init__(self, expert)
self.repopaths = { "base": "" }
self.regkey = None
|