Add --no-hard-links option to localedef (bug 23923)

System Internals / glibc - Carlos O'Donell [redhat.com] - 3 December 2018 15:15 EST

Downstream distributions need consistent sets of hardlinks in order for rpm to operate effectively. This means that even if locales are built with a high level of parallelism that the resulting files need to have consistent hardlink counts. The only way to achieve this is with a post-install hardlink pass using a program like 'hardlink' (shipped in Fedora).

If the downstream distro wants to post-process the hardlinks then the time spent in localedef looking up sibling directories and processing hardlinks is wasted effort.

To optimize the build and install pass we add a --no-hard-links option to localedef to avoid doing the hardlink optimziation for size.

Tested on x86_64 with 'make localedata/install-locale-files' before and after. Without the patch we have files with 100+ hardlink counts. After the patch and running with --no-hard-links all link counts are 1. This patch also alters the convenience target 'make localedata/install-locale-files' to use the new option.

8cebd4ffe6 Add --no-hard-links option to localedef (bug 23923)
ChangeLog | 10 ++++++++++
locale/programs/localedef.c | 10 ++++++++++
locale/programs/localedef.h | 1 +
locale/programs/locfile.c | 21 +++++++++++++++++----
localedata/Makefile | 2 +-
5 files changed, 39 insertions(+), 5 deletions(-)

Upstream: sourceware.org


  • Share