leave pregenerated locale files (save RAM)

Now that the runtime contents remain compressed and aren't always stored
in RAM, it generally takes less RAM to keep these around than to run
'localedef' in anaconda.

This switches us back to the old pre-lorax method for setting up the
locale archive - see e.g. anaconda commit ea71816d
This commit is contained in:
Will Woods 2012-06-13 18:04:17 -04:00
parent 7150cad31b
commit f36f775146

View File

@ -1,7 +1,14 @@
## lorax template file: cleanup for the ramdisk (runtime image)
<%page args="removelocales, libdir, product, root"/>
## remove_locales()
## strip unused languages out of the locale-archive
runcmd localedef --prefix ${root} \
--delete-from-archive ${" ".join(removelocales)}
move usr/lib/locale/locale-archive usr/lib/locale/locale-archive.tmpl
runcmd chroot ${root} build-locale-archive
## remove the sources
remove usr/share/i18n
## remove unused locales
%for locale in removelocales:
remove usr/share/locale/${locale}
%endfor
@ -92,10 +99,6 @@ arch/x86/kvm
remove lib/modules/*/{build,source,*.map}
## NOTE: depmod gets re-run after cleanup finishes
## remove generated locales - anaconda >=16.x builds them at runtime
removefrom glibc-common /usr/lib/locale/*
remove /usr/lib/locale/locale-archive
## remove unused themes, theme engines, icons, etc.
removefrom gtk2 /usr/${libdir}/gtk-2.0/*/{engines,printbackends}/*
removefrom gtk2 /usr/share/themes/*
@ -200,7 +203,8 @@ removefrom glibc /usr/libexec/* /usr/sbin/*
removefrom glibc-common /etc/* /usr/bin/catchsegv /usr/bin/gencat
removefrom glibc-common /usr/bin/getconf /usr/bin/getent /usr/bin/ldd
removefrom glibc-common /usr/bin/locale /usr/bin/rpcgen /usr/bin/sprof
removefrom glibc-common /usr/bin/tzselect /usr/libexec/* /usr/sbin/*
removefrom glibc-common /usr/bin/tzselect /usr/bin/localedef
removefrom glibc-common /usr/libexec/* /usr/sbin/*
removefrom gmp /usr/${libdir}/libgmpxx.* /usr/${libdir}/libmp.*
removefrom gnome-bluetooth-libs /usr/${libdir}/libgnome-bluetooth*
removefrom gnome-bluetooth-libs /usr/share/*