Re: [PATCH] Keep the source files for locales and get rid of the binary form.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2011-02-14 at 10:14 +0100, Martin Sivak wrote:
> Anaconda prepares locale as needed during runtime. This saves space.
> ---
>  share/ramdisk.ltmpl        |    6 ++++--
>  src/pylorax/installtree.py |   22 ----------------------
>  2 files changed, 4 insertions(+), 24 deletions(-)
> 
> diff --git a/share/ramdisk.ltmpl b/share/ramdisk.ltmpl
> index 0b799a6..0281339 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 9883bba..5e7983e 100644
> --- a/src/pylorax/installtree.py
> +++ b/src/pylorax/installtree.py
> @@ -64,28 +64,6 @@ class LoraxInstallTree(BaseLoraxClass):
>          langs = map(lambda l: l.split()[3].replace(".UTF-8", ".utf8"), langs)
>          langs = set(langs)

few more lines can be removed here

>  
> -        # 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()

-- 
Martin Gracik <mgracik@xxxxxxxxxx>

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux