#30 treecompose-post.sh: keep all supported LANGs
Closed by jlebon. Opened by jlebon.
jlebon/fedora-atomic pr/add-locales  into  f25

Download 30.patch

In https://bugzilla.redhat.com/show_bug.cgi?id=1186757, it was
acknowledged that a just middle between deleting all the locales and
keeping them all was to only keep "supported" locales. There doesn't
seem to be such a list for Fedora, though RHEL does have one. So for
now, we piggyback on the RHEL definition as to what "supported" means.

As of right now, this increases the on-disk size of an F25 tree by 17M.
Its compressed size should be even more insignificant.

I really don't like increasing the size of the image but I can see from the BZ this has been causing pain. I would vote that we wait on making this change until after we get the first release for F25 out the door.

Yup, sounds good.

I was testing this by porting it to CentOS, and encountered a few bugs.

Basically, while your test:

env LANG=fr_FR.UTF-8 date

is fine, my test is:

env LANG=fr_FR.UTF-8 touch /bacon

which wasn't translated, because the coreutils translations are stored in /usr/share/locale/fr, which didn't match your fr_FR pattern.

Looking at this a bit more, I realized what we really wanted was to use the install-langs as exposed by rpm-ostree -> rpm, except that was broken: https://github.com/projectatomic/rpm-ostree/pull/525

Anyways, I took this and adapted it for CentOS:

https://github.com/CentOS/sig-atomic-buildscripts/pull/179

Let's treat that PR as canonical and side-port to Fedora if you agree.

rebased

Thanks, I updated the PR with the CentOS version. Though I suppose we have to wait until a newer rpm-ostree before merging this.

Side note: needed https://pagure.io/fedora-atomic/c/8c6c825b3470dc995f4f24db80eafb45633ab446?branch=f25

Ok, I pushed: https://pagure.io/fork/walters/fedora-atomic/c/3d95646f41f238c7400fc9380d53a0e0dd72b793?branch=f25-locales
which drops the bits that glibc is already doing from treecompose-post.sh - basically we now only use RPM's _install_langs.

This also semantically changes things to retain translations, so the effect is larger. Basically we add ~58MB, from 741MB to 799MB.

(For reference, keeping all language support would bring us to ~935 MB)

@walters Could you open a PR with that commit? (And definitely reset authorship, there are no lines in common anymore with this original PR :)).

I'll close this one.

Pull-Request has been closed by jlebon

Oh I see, the F25 rpm-ostree doesn't have the instlang backport yet.

Metadata