[PATCH 1/2] Don't set ksdata.lang.seen to True if using default value

Martin Kolman mkolman at redhat.com
Thu Sep 12 10:55:03 UTC 2013


If setting kdsdata.lang.lang to the default value (DEFAULT_LANG),
don't set ksdata.lang.seen to True. Otherwise it would not be possible
to discern the default value from a value set by the user using
kickstart or a bootoption.

Also clean-up the language handling code a bit and remove
the default value setting in kickstart.py as it is no longer needed.

Related: rhbz#997397
Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
 anaconda                | 3 ++-
 pyanaconda/kickstart.py | 5 -----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/anaconda b/anaconda
index 3e745e3..c91ef2d 100755
--- a/anaconda
+++ b/anaconda
@@ -979,7 +979,8 @@ if __name__ == "__main__":
         else:
             log.error("Invalid locale '%s' given on command line or in kickstart", requested_lang)
     else:
-        localization.setup_locale(constants.DEFAULT_LANG)
+        # no kickstart or bootoption - use default
+        localization.setup_locale(constants.DEFAULT_LANG, ksdata.lang)
 
     import blivet
     blivet.enable_installer_mode()
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 3963889..3be0676 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -622,11 +622,6 @@ class IscsiName(commands.iscsiname.FC6_IscsiName):
         return retval
 
 class Lang(commands.lang.F19_Lang):
-    def __init__(self, *args, **kwargs):
-        commands.lang.F19_Lang.__init__(self, *args, **kwargs)
-        if not self.lang and not flags.automatedInstall:
-            self.lang = DEFAULT_LANG
-
     def execute(self, *args, **kwargs):
         localization.write_language_configuration(self, ROOT_PATH)
 
-- 
1.8.3.1



More information about the anaconda-patches mailing list