In F15 we started removing the glibc locale files and locale-archive in lorax, because they took up around 100MB RAM once anaconda started. In F16 and later the runtime stays compressed, so those files would take up around 4MB RAM. Running localedef takes much more RAM than that, so it's not worth the added complexity anymore. This basically reverts the following commits: eb7732732d579af57d194131b61e75f5750e19a6 ad7adf6b6eb62af29e9819b6597d36332c90e853 --- anaconda | 6 ------ pyanaconda/iw/language_gui.py | 1 - pyanaconda/kickstart.py | 1 - pyanaconda/language.py | 18 ------------------ pyanaconda/textw/language_text.py | 1 - 5 files changed, 27 deletions(-) diff --git a/anaconda b/anaconda index e3d209a..be8c7be 100755 --- a/anaconda +++ b/anaconda @@ -720,11 +720,6 @@ if __name__ == "__main__": from pyanaconda import vnc from pyanaconda import kickstart - # Write out the default locale before anything imports locale (#731356) - deflang, defcode = DEFAULT_LANG.split('.') - iutil.execWithRedirect("localedef", - ["-i", deflang, "-f", defcode, DEFAULT_LANG]) - # to set UTF8 mode on the terminal, we need LANG to be set usefully if os.environ.get("LANG", "C") == "C": os.environ['LANG'] = DEFAULT_LANG @@ -921,7 +916,6 @@ if __name__ == "__main__": opts.lang = opts.lang.replace(".utf8", ".UTF-8") anaconda.dispatch.skip_steps("language") anaconda.instLanguage.instLang = opts.lang - anaconda.instLanguage.buildLocale() anaconda.instLanguage.systemLang = opts.lang anaconda.timezone.setTimezoneInfo(anaconda.instLanguage.getDefaultTimeZone()) diff --git a/pyanaconda/iw/language_gui.py b/pyanaconda/iw/language_gui.py index 75fa66b..c144f84 100644 --- a/pyanaconda/iw/language_gui.py +++ b/pyanaconda/iw/language_gui.py @@ -50,7 +50,6 @@ class LanguageWindow (InstallWindow): self.instLang.instLang = self.lang self.instLang.systemLang = self.lang - self.instLang.buildLocale() anaconda.timezone.setTimezoneInfo(anaconda.instLanguage.getDefaultTimeZone()) self.ics.getICW().setLanguage() diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py index 0c7c520..5888e4f 100644 --- a/pyanaconda/kickstart.py +++ b/pyanaconda/kickstart.py @@ -528,7 +528,6 @@ class Lang(commands.lang.FC3_Lang): def execute(self): self.anaconda.instLanguage.instLang = self.lang self.anaconda.instLanguage.systemLang = self.lang - self.anaconda.instLanguage.buildLocale() self.anaconda.dispatch.skip_steps("language") class LogVolData(commands.logvol.F17_LogVolData): diff --git a/pyanaconda/language.py b/pyanaconda/language.py index bbb6a31..db499fc 100644 --- a/pyanaconda/language.py +++ b/pyanaconda/language.py @@ -21,7 +21,6 @@ # import os -import re import string import locale @@ -34,11 +33,6 @@ import system_config_keyboard.keyboard as keyboard import logging log = logging.getLogger("anaconda") -def langComponents(astring): - pattern = re.compile("(?P<language>[A-Za-z]+)(_(?P<territory>[A-Za-z]+))?(\.(?P<codeset>[-\w]+))?(@(?P<modifier>[-\w]+))?") - m = pattern.match(astring) - return m.groupdict() - class Language(object): def _setInstLang(self, value): # Always store in its full form so we know what we're comparing with. @@ -159,18 +153,6 @@ class Language(object): def available(self): return self.nativeLangNames.keys() - def buildLocale(self): - import iutil - - c = langComponents(self._instLang) - locale_p = c["language"] - if c["territory"]: - locale_p += "_" + c["territory"] - if c["modifier"]: - locale_p += "@" + c["modifier"] - - iutil.execWithRedirect("localedef", ["-i", locale_p, "-f", c["codeset"] or "UTF-8", self._instLang]) - def dracutSetupArgs(self): args=set() diff --git a/pyanaconda/textw/language_text.py b/pyanaconda/textw/language_text.py index 7bbdf1e..81461bd 100644 --- a/pyanaconda/textw/language_text.py +++ b/pyanaconda/textw/language_text.py @@ -63,7 +63,6 @@ class LanguageWindow: anaconda.instLanguage.instLang = choice anaconda.instLanguage.systemLang = choice - anaconda.instLanguage.buildLocale() anaconda.timezone.setTimezoneInfo(anaconda.instLanguage.getDefaultTimeZone()) anaconda.intf.drawFrame() -- 1.7.10.2 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list