From patchwork Wed Feb 15 08:49:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ken Werner X-Patchwork-Id: 6784 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0F07823F8D for ; Wed, 15 Feb 2012 08:49:29 +0000 (UTC) Received: from mail-tul01m020-f180.google.com (mail-tul01m020-f180.google.com [209.85.214.180]) by fiordland.canonical.com (Postfix) with ESMTP id B6B0BA189B6 for ; Wed, 15 Feb 2012 08:49:28 +0000 (UTC) Received: by obbuo19 with SMTP id uo19so1575386obb.11 for ; Wed, 15 Feb 2012 00:49:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.87.136 with SMTP id ay8mr22767200igb.25.1329295768024; Wed, 15 Feb 2012 00:49:28 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.66.135 with SMTP id n7cs4934ibi; Wed, 15 Feb 2012 00:49:27 -0800 (PST) Received: by 10.181.12.106 with SMTP id ep10mr6992545wid.8.1329295765845; Wed, 15 Feb 2012 00:49:25 -0800 (PST) Received: from e06smtp18.uk.ibm.com (e06smtp18.uk.ibm.com. [195.75.94.114]) by mx.google.com with ESMTPS id s34si1894696weq.113.2012.02.15.00.49.24 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 15 Feb 2012 00:49:25 -0800 (PST) Received-SPF: neutral (google.com: 195.75.94.114 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) client-ip=195.75.94.114; Authentication-Results: mx.google.com; spf=neutral (google.com: 195.75.94.114 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) smtp.mail=ken.werner@linaro.org Received: from /spool/local by e06smtp18.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 15 Feb 2012 08:49:24 -0000 Received: from d06nrmr1307.portsmouth.uk.ibm.com (9.149.38.129) by e06smtp18.uk.ibm.com (192.168.101.148) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 15 Feb 2012 08:49:22 -0000 Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q1F8nLJ12576428 for ; Wed, 15 Feb 2012 08:49:21 GMT Received: from d06av07.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q1F8nLpH027628 for ; Wed, 15 Feb 2012 01:49:21 -0700 Received: from bolide.boeblingen.de.ibm.com (dyn-9-152-213-71.boeblingen.de.ibm.com [9.152.213.71]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q1F8nKT7027594; Wed, 15 Feb 2012 01:49:20 -0700 From: Ken Werner To: openembedded-core@lists.openembedded.org Subject: [PATCH] Add sanity checks for eglibc locale Date: Wed, 15 Feb 2012 09:49:07 +0100 Message-Id: <1329295747-25855-1-git-send-email-ken.werner@linaro.org> X-Mailer: git-send-email 1.7.5.4 x-cbid: 12021508-6892-0000-0000-00000103C33D X-Gm-Message-State: ALoCoQlPwSErvlqkr9MEEGmoCNrGDIVkWO7eACZTayGKPAa9/twlqtEUCxOjebfzDhu+VrsrzjDP Add sanity checks that test for the existance of folders. This allows to use an external binary toolchain that doesn't have localization support. --- meta/recipes-core/eglibc/eglibc-locale.inc | 20 +++++++++++++++----- meta/recipes-core/eglibc/eglibc-package.inc | 4 +++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/meta/recipes-core/eglibc/eglibc-locale.inc b/meta/recipes-core/eglibc/eglibc-locale.inc index b4646fa..2e9b4d4 100644 --- a/meta/recipes-core/eglibc/eglibc-locale.inc +++ b/meta/recipes-core/eglibc/eglibc-locale.inc @@ -72,11 +72,21 @@ LOCALETREESRC = "${STAGING_INCDIR}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS do_install () { mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir} - cp -fpPR ${LOCALETREESRC}/${bindir}/* ${D}${bindir} - cp -fpPR ${LOCALETREESRC}/${libdir}/locale ${D}${libdir} - cp -fpPR ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir} - cp -fpPR ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir} - cp -fpPR ${LOCALETREESRC}/${datadir}/locale ${D}${datadir} + if [ -n "$(ls ${LOCALETREESRC}/${bindir})" ]; then + cp -fpPR ${LOCALETREESRC}/${bindir}/* ${D}${bindir} + fi + if [ -e ${LOCALETREESRC}/${libdir}/locale ]; then + cp -fpPR ${LOCALETREESRC}/${libdir}/locale ${D}${libdir} + fi + if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then + cp -fpPR ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir} + fi + if [ -e ${LOCALETREESRC}/${datadir}/i18n ]; then + cp -fpPR ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir} + fi + if [ -e ${LOCALETREESRC}/${datadir}/locale ]; then + cp -fpPR ${LOCALETREESRC}/${datadir}/locale ${D}${datadir} + fi cp -fpPR ${LOCALETREESRC}/SUPPORTED ${WORKDIR} } diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc index 870b95d..2a1d939 100644 --- a/meta/recipes-core/eglibc/eglibc-package.inc +++ b/meta/recipes-core/eglibc/eglibc-package.inc @@ -91,7 +91,9 @@ do_install_locale () { mv -f ${D}${libdir}/gconv ${dest}${libdir} fi cp -fpPR ${D}${libdir}/* ${dest}${libdir} - mv ${D}${datadir}/i18n ${dest}${datadir} + if [ -e ${D}${datadir}/i18n ]; then + mv ${D}${datadir}/i18n ${dest}${datadir} + fi cp -fpPR ${D}${datadir}/* ${dest}${datadir} cp -fpPR ${WORKDIR}/SUPPORTED ${dest} }