glibc-external: only sed files that exist

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
This commit is contained in:
Christopher Larson
2020-06-20 03:09:17 +05:00
parent f758d228c4
commit e77b6d4ecc

View File

@@ -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 () {