From 985b95d82172bc2b363ee3beec97669a2eba2a8b Mon Sep 17 00:00:00 2001 From: Marc Bourgoin Date: Wed, 10 Feb 2021 22:38:58 -0700 Subject: sdm660-common: Add a check before adding dependencies Without a check, when performing a vendor blob regen it'll add another dependency on top of any existing one Change-Id: I9c7f17082fd850235c794d44cec3cda0c4b883ef --- extract-files.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extract-files.sh b/extract-files.sh index 930ad0b..a140fa6 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -74,7 +74,9 @@ function blob_fixup() { sed -i 's|/product/framework/qcrilhook.jar|/system_ext/framework/qcrilhook.jar|g' "${2}" ;; system_ext/lib64/libdpmframework.so) - "${PATCHELF}" --add-needed "libshim_dpmframework.so" "${2}" + for LIBSHIM_DPMFRAMEWORK in $(grep -L "libshim_dpmframework.so" "${2}"); do + "${PATCHELF}" --add-needed "libshim_dpmframework.so" "$LIBSHIM_DPMFRAMEWORK" + done ;; vendor/bin/mlipayd@1.1) "${PATCHELF}" --remove-needed vendor.xiaomi.hardware.mtdservice@1.0.so "${2}" -- cgit v1.2.3