diff --git a/share/ramdisk.ltmpl b/share/ramdisk.ltmpl index 0b799a60..02813395 100644 --- a/share/ramdisk.ltmpl +++ b/share/ramdisk.ltmpl @@ -747,13 +747,15 @@ remove "glibc-common" "/usr/bin/getconf" remove "glibc-common" "/usr/bin/getent" remove "glibc-common" "/usr/bin/ldd" remove "glibc-common" "/usr/bin/locale" -remove "glibc-common" "/usr/bin/localedef" remove "glibc-common" "/usr/bin/rpcgen" remove "glibc-common" "/usr/bin/sprof" remove "glibc-common" "/usr/bin/tzselect" remove "glibc-common" "/usr/libexec/*" remove "glibc-common" "/usr/sbin/*" -remove "glibc-common" "/usr/share/i18n/*" + +# remove generated locales anaconda knows how to restore them at runtime +remove "glibc-common" "/usr/lib/locale/*" + remove "gmp" "/usr/${libdir}/libgmpxx.*" remove "gmp" "/usr/${libdir}/libmp.*" remove "gnome-bluetooth-libs" "/usr/${libdir}/libgnome-bluetooth*" diff --git a/src/pylorax/installtree.py b/src/pylorax/installtree.py index 9883bba3..7d97e775 100644 --- a/src/pylorax/installtree.py +++ b/src/pylorax/installtree.py @@ -58,34 +58,6 @@ class LoraxInstallTree(BaseLoraxClass): logger.critical("could not find anaconda lang-table, exiting") sys.exit(1) - with open(langtable, "r") as fobj: - langs = fobj.readlines() - - langs = map(lambda l: l.split()[3].replace(".UTF-8", ".utf8"), langs) - langs = set(langs) - - # get locales from locale-archive - localearch = "/usr/lib/locale/locale-archive" - - cmd = [self.lcmds.LOCALEDEF, "--list-archive", localearch] - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, preexec_fn=chroot) - output = proc.stdout.read() - - remove = set(output.split()) - langs - - # remove not needed locales - cmd = [self.lcmds.LOCALEDEF, "-i", localearch, - "--delete-from-archive"] + list(remove) - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, preexec_fn=chroot) - proc.wait() - - localearch = joinpaths(self.root, localearch) - shutil.move(localearch, localearch + ".tmpl") - - proc = subprocess.Popen([self.lcmds.BUILD_LOCALE_ARCHIVE], - preexec_fn=chroot) - proc.wait() - # remove unneeded locales from /usr/share/locale with open(langtable, "r") as fobj: langs = fobj.readlines()