extract-utils: Set install_symlink PREFIX based on installed_location
PREFIX should be based on installed_location and not symlink_target
since symlink_target could be odm and installed_location on vendor.
In such example, the previous logic would make it an odm target instead
of a vendor one.
Change-Id: I867acd5e6d22653a83a2b0fec577e50f1e9dd225
diff --git a/extract_utils.sh b/extract_utils.sh
index 9d58ede..f2b3a07 100644
--- a/extract_utils.sh
+++ b/extract_utils.sh
@@ -969,16 +969,16 @@
{
printf 'install_symlink {\n'
printf '\tname: "%s",\n' "$PKGNAME"
- if prefix_match_file "vendor/" "$FILE"; then
+ if prefix_match_file "vendor/" "$SYMLINK"; then
PREFIX='vendor/'
printf '\tsoc_specific: true,\n'
- elif prefix_match_file "product/" "$FILE"; then
+ elif prefix_match_file "product/" "$SYMLINK"; then
PREFIX='product/'
printf '\tproduct_specific: true,\n'
- elif prefix_match_file "system_ext/" "$FILE"; then
+ elif prefix_match_file "system_ext/" "$SYMLINK"; then
PREFIX='system_ext/'
printf '\tsystem_ext_specific: true,\n'
- elif prefix_match_file "odm/" "$FILE"; then
+ elif prefix_match_file "odm/" "$SYMLINK"; then
PREFIX='odm/'
printf '\tdevice_specific: true,\n'
fi