Keep the source files for locales and get rid of the binary form.

Anaconda prepares locale as needed during runtime. This saves space.
This commit is contained in:
Martin Sivak 2011-02-14 10:11:08 +01:00
parent 7d9a728651
commit ee955f3ad1
2 changed files with 4 additions and 30 deletions

View File

@ -747,13 +747,15 @@ remove "glibc-common" "/usr/bin/getconf"
remove "glibc-common" "/usr/bin/getent" remove "glibc-common" "/usr/bin/getent"
remove "glibc-common" "/usr/bin/ldd" remove "glibc-common" "/usr/bin/ldd"
remove "glibc-common" "/usr/bin/locale" remove "glibc-common" "/usr/bin/locale"
remove "glibc-common" "/usr/bin/localedef"
remove "glibc-common" "/usr/bin/rpcgen" remove "glibc-common" "/usr/bin/rpcgen"
remove "glibc-common" "/usr/bin/sprof" remove "glibc-common" "/usr/bin/sprof"
remove "glibc-common" "/usr/bin/tzselect" remove "glibc-common" "/usr/bin/tzselect"
remove "glibc-common" "/usr/libexec/*" remove "glibc-common" "/usr/libexec/*"
remove "glibc-common" "/usr/sbin/*" 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}/libgmpxx.*"
remove "gmp" "/usr/${libdir}/libmp.*" remove "gmp" "/usr/${libdir}/libmp.*"
remove "gnome-bluetooth-libs" "/usr/${libdir}/libgnome-bluetooth*" remove "gnome-bluetooth-libs" "/usr/${libdir}/libgnome-bluetooth*"

View File

@ -58,34 +58,6 @@ class LoraxInstallTree(BaseLoraxClass):
logger.critical("could not find anaconda lang-table, exiting") logger.critical("could not find anaconda lang-table, exiting")
sys.exit(1) 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 # remove unneeded locales from /usr/share/locale
with open(langtable, "r") as fobj: with open(langtable, "r") as fobj:
langs = fobj.readlines() langs = fobj.readlines()