This commit applies several quality improvements to the glibc-2.36-r8
ebuild and its predecessors. These improvements are described herewith.
Refrain from specifying the --inplace-glibc option to locale-gen(1),
fixing builds for which the "compile-locales" USE flag is in effect.
As regards the pkg_postinst() function, raise a warning if locale-gen(1)
does not exit successfully.
As regards the glibc_do_src_install() function, die if locale-gen(1)
does not exit successfully.
Refrain from specifying the --jobs option to locale-gen(1) in the case
that the value of the 'EMERGE_FROM' variable is "binary".
As regards the pkg_postinst() function of the glibc-2.19-r3 ebuild,
check whether the value of the 'ROOT' variable is empty rather than
non-empty, just as all of the other ebuilds do.
See-also: e133de5ee597abf391f5ea3d13e1d077a40a2165
Closes: https://bugs.gentoo.org/915629
Bug: https://bugs.gentoo.org/736794
Signed-off-by: Kerin Millar <kfm@plushkava.net>
Signed-off-by: Sam James <sam@gentoo.org>
Presently, the gentoo package repository offers sys-apps/locale-gen-3.0,
a fully rewritten implementation of the locale-gen(1) utility which
addresses a great many issues of reliability and safety. However, this
new implementation is not yet supported by the sys-libs/glibc package.
For it to be supported, the ebuild must acknowledge the existence of the
new --prefix option, which effectively supplants the --destdir option.
Indeed, the new implementation no longer supports the --destdir option,
partly because the behaviour of both options isn't wholly identical.
Add support for >=sys-apps/locale-gen-3 by having the run_locale_gen()
function determine the version of locale-gen that is installed. In the
event that is found to be 3.0 or greater, only the --prefix and --jobs
options may be specified. In addition to making this necessary change,
some miscellaneous improvements have been made to the ebuilds. These
improvements are described herewith.
As regards the pkg_postinst() function, raise a warning if locale-gen(1)
does not exit successfully.
As regards the glibc_do_src_install() function, die if locale-gen(1)
does not exit successfully. There is no sense in allowing for the
package to be built without an integrated locale archive in the case
that USE="compile-locales" is in effect.
As regards the run_locale_gen() function, use the read builtin to
consume no more than a single line of output from "locale-gen --list".
To do is more efficient and produces less noise if PORTAGE_DEBUG=1 be
enabled. Also, use the ${param@Q} form of expansion to unambiguously
show how the locale-gen command has been composed before executing.
Refrain from specifying the --inplace-glibc option in the case that
<sys-apps/locale-gen-3 is found. It causes locale-gen(1) to fail because
the utility expects to be able to find the linux loader by matching
against "ld-*.so" as a glob, whereas it now has a suffix of ".so.1" or
".so.2", depending on the architecture. To address the bug directly was
considered as being unnecessary because:
- the effort is better spent in keywording >=sys-apps/locale-gen-3
- =sys-apps/locale-gen-3.0 dispenses with the --inplace-glibc option
Finally, it should be noted that =sys-apps/locale-gen-3.0 is
incompatible with the "compile-locales" USE flag, owing to a bug that
will be addressed by its next release.
Bug: https://bugs.gentoo.org/945269
Closes: https://bugs.gentoo.org/915629
Signed-off-by: Kerin Millar <kfm@plushkava.net>
Signed-off-by: Sam James <sam@gentoo.org>