Makefile: Fix target-purgelocales
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 Makefile: Fix target-purgelocales
The /usr/share/X11/locale/locale.dir file is needed by libX11. Removing it breaks locale support in X11. However, make removes not only directories but also all files, which are not listed in the BR2_ENABLE_LOCALE_WHITELIST.
This re-creates locale.dir database file where needed.
--- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
Makefile +6 -4
@@ -478,11 +478,13 @@ target-purgelocales: for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/man /usr/share/man)); \ do \ - for lang in $$(cd $$dir; ls .|grep -v man); \ + (cd $$dir && rm -f locale.dir && \ + for lang in $$(ls .|grep -v "man\|locale\.dir"); \ do \ - grep -qx $$lang $(LOCALE_WHITELIST) || rm -rf $$dir/$$lang; \ - done; \ - done + grep -qx $$lang $(LOCALE_WHITELIST) || rm -rf $$lang; \ + [ ! -f $$lang/XLC_LOCALE ] || echo "$$lang/XLC_LOCALE: $$lang" >> locale.dir; \ + done) \ + done; endif ifneq ($(GENERATE_LOCALE),)
Signature · 1 line
1.7.11.4
PATCH 2/2 Makefile: Add /usr/lib/locale to target-purgelocales
In reply to a message not in the archiveSome packages install locales to /usr/lib/locale.
Parse and purge unneeded ones there too.
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -476,7 +476,7 @@ target-purgelocales: rm -f $(LOCALE_WHITELIST) for i in $(LOCALE_NOPURGE); do echo $$i >> $(LOCALE_WHITELIST); done - for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/man /usr/share/man)); \ + for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/man /usr/share/man /usr/lib/locale)); \ do \ (cd $$dir && rm -f locale.dir && \ for lang in $$(ls .|grep -v "man\|locale\.dir"); \
Signature · 1 line
1.7.11.4
PATCH 2/2 Makefile: Add /usr/lib/locale to target-purgelocales
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Valentine" == Valentine Barshak <[email protected]> writes:
Hi,
Quoted 2 lines
Some packages install locales to
/usr/lib/locale.
Parse and purge unneeded ones there too.
Sorry for the delay - Commited, thanks.
Signature · 1 line
Bye, Peter Korsgaard