From e77b6d4ecced0dab060cd7fd138104be8115b8d4 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Sat, 20 Jun 2020 03:09:17 +0500 Subject: [PATCH] glibc-external: only sed files that exist Signed-off-by: Christopher Larson --- recipes-external/glibc/glibc-external.bb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/recipes-external/glibc/glibc-external.bb b/recipes-external/glibc/glibc-external.bb index 3f84eaf..60074eb 100644 --- a/recipes-external/glibc/glibc-external.bb +++ b/recipes-external/glibc/glibc-external.bb @@ -116,15 +116,21 @@ glibc_external_do_install_extra () { # Work around localedef failures for non-precompiled for locale in bo_CN bo_IN; do - sed -i -e '/^name_fmt\s/s/""/"???"/' "${D}${datadir}/i18n/locales/$locale" - if grep -q '^name_fmt.*""' "${D}${datadir}/i18n/locales/$locale"; then - bbfatal "sed did not fix $locale" + if [ -e "${D}${datadir}/i18n/locales/$locale" ]; then + sed -i -e '/^name_fmt\s/s/""/"???"/' "${D}${datadir}/i18n/locales/$locale" + if grep -q '^name_fmt.*""' "${D}${datadir}/i18n/locales/$locale"; then + bbfatal "sed did not fix $locale" + fi fi done # Avoid bash dependency - sed -e '1s#bash#sh#; s#$"#"#g' -i "${D}${bindir}/ldd" - sed -e '1s#bash#sh#' -i "${D}${bindir}/tzselect" + if [ -e "${D}${bindir}/ldd" ]; then + sed -e '1s#bash#sh#; s#$"#"#g' -i "${D}${bindir}/ldd" + fi + if [ -e "${D}${bindir}/tzselect" ]; then + sed -e '1s#bash#sh#' -i "${D}${bindir}/tzselect" + fi } bberror_task-install () {