summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--docs/kickstart-docs.txt31
-rw-r--r--exception.py3
-rw-r--r--installclass.py16
-rw-r--r--iw/language_gui.py1
-rw-r--r--kickstart.py18
-rw-r--r--language.py64
-rw-r--r--packages.py2
-rw-r--r--textw/language_text.py1
9 files changed, 27 insertions, 124 deletions
diff --git a/ChangeLog b/ChangeLog
index 7670a4a8d..c6e7ee6f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2005-06-28 Chris Lumens <clumens@redhat.com>
+
+ * exception.py (dumpClass.keySkipList): Remove references to
+ langsupport.
+ * packages.py (selectLanguageSupportGroups): Likewise.
+ * iw/language_gui.py (LanguageWindow.getNext): Likewise.
+ * textw/language_text.py (LanguageWindow.__call__): Likewise.
+ * installclass.py (BaseInstallClass.setLanguageSupport): Removed.
+ * kickstart.py (Kickstart.doLangSupport): Removed langsupport keyword.
+ * language.py (Language): Remove langsupport and langInfoByName
+ lists; and getSupported, getAllSupported, and setSupported methods.
+
+ * docs/kickstart-docs.txt: Mark langsupport as deprecated and explain
+ what to do instead. Also clarify the purpose of the lang keyword.
+
2005-06-27 Chris Lumens <clumens@redhat.com>
* fsset.py: Add a clobberDevice method used for obliterating
diff --git a/docs/kickstart-docs.txt b/docs/kickstart-docs.txt
index 9917d72aa..818520596 100644
--- a/docs/kickstart-docs.txt
+++ b/docs/kickstart-docs.txt
@@ -606,7 +606,8 @@ Creating the Kickstart File
lang (required)
- Sets the language to use during installation. For example, to set
+ Sets the language to use during installation and the default
+ language to use on the installed system. For example, to set
the language to English, the kickstart file should contain the
following line:
@@ -616,28 +617,16 @@ Creating the Kickstart File
list the valid language codes in the first column of each line and
is part of the redhat-config-languages package.
- langsupport (required)
+ langsupport
- Sets the language(s) to install on the system. The same language
- codes used with lang can be used with langsupport.
+ The langsupport keyword is deprecated and its use will cause an
+ error message to be printed to the screen and installation to halt.
+ Instead of using the langsupport keyword, you should now list the
+ support package groups for all languages you want supported in the
+ %packages section of your kickstart file. Fr instance, adding
+ support for French means you should add the following to %packages:
- To install one language, specify it. For example, to install and
- use the French language fr_FR:
-
- langsupport fr_FR
-
- --default=
-
- If language support for more than one language is specified, a
- default must be identified.
-
- For example, to install English and French and use English as the
- default language:
-
- langsupport --default=en_US fr_FR
-
- If you use --default with only one language, all languages will be
- installed with the specified language set to the default.
+ @french-support
logvol (optional)
diff --git a/exception.py b/exception.py
index 22c6f2feb..3d9274576 100644
--- a/exception.py
+++ b/exception.py
@@ -51,10 +51,8 @@ def dumpClass(instance, fd, level=0, parentkey=""):
"id.instLanguage.font",
"id.instLanguage.kbd",
"id.instLanguage.tz",
- "id.instLanguage.langInfoByName",
"id.instLanguage.langNicks",
"id.instLanguage.langList",
- "id.instLanguage.allSupportedLangs",
"id.rootPassword",
"id.tmpData",
"id.xsetup.xhwstate.monitor.monlist",
@@ -169,7 +167,6 @@ def dumpException(out, text, tb, dispatch):
# dispatch.id.xsetup.xhwstate.monitor.monids = None
# dispatch.id.instLanguage.langNicks = None
# dispatch.id.instLanguage.langList = None
-# dispatch.id.instLanguage.allSupportedLangs = None
# dispatch.intf.icw.buff = None
# except:
# pass
diff --git a/installclass.py b/installclass.py
index 596a53236..9fd121c2b 100644
--- a/installclass.py
+++ b/installclass.py
@@ -346,21 +346,6 @@ class BaseInstallClass:
if wepkey:
dev.set(("wepkey", wepkey))
- def setLanguageSupport(self, id, nickList):
- if len (nickList) == 0:
- id.instLanguage.setSupported(id.instLanguage.getAllSupported())
- else:
- newlist = []
- for nick in nickList:
- if nick not in newlist:
- newlist.append(nick)
-
- default = id.instLanguage.getDefault()
- if default not in newlist:
- newlist.append(default)
-
- id.instLanguage.setSupported(newlist)
-
def setLanguageDefault(self, id, default):
id.instLanguage.setDefault(default)
@@ -560,7 +545,6 @@ class BaseInstallClass:
#id.setLanguage()
#id.setNetwork()
#id.setFirewall()
- #id.setLanguageSupport()
#id.setLanguageDefault()
#id.setTimezone()
#id.setRootPassword()
diff --git a/iw/language_gui.py b/iw/language_gui.py
index 673e555d2..28bb18ad4 100644
--- a/iw/language_gui.py
+++ b/iw/language_gui.py
@@ -35,7 +35,6 @@ class LanguageWindow (InstallWindow):
self.instLang.setRuntimeLanguage(self.lang)
self.instLang.setDefault(self.lang)
- self.instLang.setSupported([self.lang])
self.ics.getICW().setLanguage()
return None
diff --git a/kickstart.py b/kickstart.py
index 619d7836a..f5a34c553 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -576,23 +576,7 @@ class Kickstart(BaseInstallClass):
self.skipSteps.append("language")
def doLangSupport (self, id, args):
- (args, extra) = isys.getopt(args, '', [ 'default=' ])
- deflang = "en_US.UTF-8"
- if args:
- deflang = args[0][1]
- else:
- # if they specified no default we default to en_US if
- # they installed support for more than one lang, otherwise
- # we default to the one language they specified support for
- if extra is None:
- deflang = "en_US.UTF-8"
- elif len(extra) >= 1:
- deflang = extra[0]
- else:
- deflang = "en_US.UTF-8"
-
- self.setLanguageDefault (id, deflang)
- self.setLanguageSupport(id, extra)
+ raise KickstartError, "The langsupport keyword has been removed. Instead, please alter your kickstart file to include the support package groups for the languages you want instead of using langsupport. For instance, include the french-support group instead of specifying 'langsupport fr'."
def doKeyboard(self, id, args):
self.setKeyboard(id, args[0])
diff --git a/language.py b/language.py
index b9272d40c..3f85e2d36 100644
--- a/language.py
+++ b/language.py
@@ -42,12 +42,7 @@ def expandLangs(astring):
class Language:
def __init__ (self):
self.info = {}
- self.info["SUPPORTED"] = None
- self.supported = []
self.default = None
-
- self.allSupportedLangs = []
- self.langInfoByName = {}
self.nativeLangNames = {}
self.localeInfo = {}
@@ -99,26 +94,6 @@ class Language:
# Hard code this to prevent errors in the build environment.
self.localeInfo['C'] = self.localeInfo['en_US.UTF-8']
- # long name -> (nick, map, font) mapping
- search = ('locale-list', '/usr/share/anaconda/locale-list')
- for path in search:
- if os.access(path, os.R_OK):
- f = open(path, 'r')
-
- for line in f.readlines():
- line = string.strip(line)
- (nick, map, font, name) = string.split(line, '\t')
- self.langInfoByName[name] = (nick, map, font)
-
- f.close()
- break
-
- # If we weren't able to find a locale-list, set a reasonable default.
- if not self.allSupportedLangs:
- self.langInfoByName['English (USA)'] = ('en_US.UTF-8', 'iso01', 'default8x16')
-
- self.allSupportedLangs = self.langInfoByName.keys()
-
# Set the language for anaconda to be using based on current $LANG.
self.setRuntimeLanguage(self.current)
self.setDefault(self.current)
@@ -159,12 +134,6 @@ class Language:
def available (self):
return self.nativeLangNames.keys()
- def getSupported (self):
- return self.supported
-
- def getAllSupported (self):
- return self.allSupportedLangs
-
def getCurrentLangSearchList(self):
return expandLangs(self.getCurrent()) + ['C']
@@ -190,32 +159,6 @@ class Language:
if nick == "zh_CN.GB18030":
self.info['LANGUAGE'] = "zh_CN.GB18030:zh_CN.GB2312:zh_CN"
- def setSupported (self, nickList):
- if len(nickList) == len(self.allSupportedLangs):
- self.info["SUPPORTED"] = None
- self.supported = self.getAllSupported()
- elif nickList:
- rpmNickList = []
-
- for nick in nickList:
- for sub in expandLangs(nick):
- if not sub in rpmNickList:
- rpmNickList.append(sub)
-
- linguas = string.join (rpmNickList, ':')
- self.info["SUPPORTED"] = linguas
- self.supported = rpmNickList
-
- shortLinguas = string.join (rpmNickList, ':')
- else:
- self.info["SUPPORTED"] = None
- self.supported = None
-
- if self.info["SUPPORTED"]:
- os.environ ["LINGUAS"] = self.info["SUPPORTED"]
- else:
- os.environ ["LINGUAS"] = ""
-
def setRuntimeDefaults(self, nick):
canonNick = self.canonLangNick(nick)
self.current = canonNick
@@ -242,11 +185,4 @@ class Language:
f.close()
def writeKS(self, f):
- sup = ""
-
- if self.info["SUPPORTED"] != None:
- for n in self.getSupported():
- sup = sup + " " + n
-
f.write("lang %s\n" % self.info['LANG'])
- f.write("langsupport --default=%s%s\n" % (self.getDefault(), sup))
diff --git a/packages.py b/packages.py
index df3f56f05..d5ee90ce4 100644
--- a/packages.py
+++ b/packages.py
@@ -1601,7 +1601,7 @@ def selectLanguageSupportGroups(grpset, instLanguage):
if not grpset.groups.has_key("language-support"):
return
- langs = instLanguage.getSupported()
+ langs = []
for l in language.expandLangs (instLanguage.getDefault()):
langs.append(l)
diff --git a/textw/language_text.py b/textw/language_text.py
index dcde03ae9..769ee1a2d 100644
--- a/textw/language_text.py
+++ b/textw/language_text.py
@@ -83,7 +83,6 @@ class LanguageWindow:
instLanguage.setRuntimeLanguage(choice)
instLanguage.setDefault(choice)
- instLanguage.setSupported([choice])
textInterface.drawFrame()