From patchwork Tue Oct 2 19:03:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentine Barshak X-Patchwork-Id: 188623 X-Patchwork-Delegate: patrickdepinguin+buildroot@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 7FCFE2C00A9 for ; Wed, 3 Oct 2012 05:03:32 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6462810247F; Tue, 2 Oct 2012 19:03:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8QyHvcUzHWNM; Tue, 2 Oct 2012 19:03:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 53EE610219D; Tue, 2 Oct 2012 19:03:23 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 9EAA88F74A for ; Tue, 2 Oct 2012 19:03:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 58E5E88C1A for ; Tue, 2 Oct 2012 19:03:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PMiexqIqeZhp for ; Tue, 2 Oct 2012 19:03:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com [209.85.217.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7564A8B331 for ; Tue, 2 Oct 2012 19:03:14 +0000 (UTC) Received: by lbom4 with SMTP id m4so12653005lbo.16 for ; Tue, 02 Oct 2012 12:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; bh=FXbBaQJWzEh8tYneYpK+IbSaPDlZ2YnXxV10Z7Gz9Xg=; b=NQvMDQP3n/L5t89AI0QwaJ7vGjNK+tSoHQ8QCqBw/EZtuShtL9nfDRJtKunEdvf8CB MLlN00u+AKhhaL00X+eoVKCwv1ugvvf3js05XnrQ51sPkiIjoS4f6V+17I0sdXLBTv3h oRbomqXD7L62goXGQsozPN7hJSeaCwGAqUHg4/Vc88yiBLQRob1PS1FxHESlPTnao1qS Uw5ZevQmzrj5R+ry2ODtb9rk2gLKx8ATPr84DzGFr0QJhG4vkkB6PFETBVuh6uDHAHe5 Ou8qbB+bkTuNf90Wk/UmViameUaZhDeminPWPTWFC8sHWJbquo8Y8WrFbSNAYRY7/Wq0 j6RQ== Received: by 10.112.39.227 with SMTP id s3mr376167lbk.106.1349204592382; Tue, 02 Oct 2012 12:03:12 -0700 (PDT) Received: from black.localnet ([93.100.122.208]) by mx.google.com with ESMTPS id sx3sm705829lab.9.2012.10.02.12.03.11 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2012 12:03:11 -0700 (PDT) From: Valentine Barshak To: buildroot@busybox.net Date: Tue, 2 Oct 2012 23:03:50 +0400 Message-Id: <1349204631-21077-2-git-send-email-gvaxon@gmail.com> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1349204631-21077-1-git-send-email-gvaxon@gmail.com> References: <1349204631-21077-1-git-send-email-gvaxon@gmail.com> Subject: [Buildroot] [PATCH 1/2] Makefile: Fix target-purgelocales X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net 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. Signed-off-by: Valentine Barshak --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 0128839..009debe 100644 --- a/Makefile +++ b/Makefile @@ -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),)