Browse Source

glibc-external: only sed files that exist

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Christopher Larson 3 years ago
parent
commit
e77b6d4ecc
1 changed files with 11 additions and 5 deletions
  1. 11 5
      recipes-external/glibc/glibc-external.bb

+ 11 - 5
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 () {