From: Mateusz Moscicki Date: Wed, 2 Apr 2025 09:52:32 +0000 (+0200) Subject: Stop displaying error if dlconf is disabled X-Git-Tag: accepted/tizen/unified/20250516.202936^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_unified_dev;p=profile%2Fcommon%2Fmeta.git Stop displaying error if dlconf is disabled In case the glibc is built without dlconf support, the /hal/etc/ld.so.cache building attempt to results in an error about unsupported `-I` option by ld.so. This commit turns out the display of the error in this case. Change-Id: I0f0bf043ebf3e94753bb24ba848889197888c01e --- diff --git a/scripts/iot-hal-backend.post b/scripts/iot-hal-backend.post index a79809d..064e85b 100644 --- a/scripts/iot-hal-backend.post +++ b/scripts/iot-hal-backend.post @@ -137,4 +137,11 @@ build_time=$(/bin/date -u --date @$build_ts +%H:%M:%S) /hal/lib64 EOF -/usr/sbin/ldconfig -I -C /hal/etc/ld.so.cache -f /tmp/dlconf.txt +ldconfig_result=$(/usr/sbin/ldconfig -I -C /hal/etc/ld.so.cache -f /tmp/dlconf.txt 2>&1) +if [ $? != 0 ]; then + if [[ "$ldconfig_result" == *"invalid option -- 'I'"* ]]; then + echo "/hal/etc/ld.so.cache will not be generated - glibc was compiled without dlconf support" + else + echo "$ldconfig_result" + fi +fi