extract-utils: Ensure that install_symlink names are always unique

Since the logic only takes into account the filename without extension,
it may happen that multiple files end up having the same BASENAME and
SYMLINK_BASENAME, meaning duplicate install_symlink names and then
causing Soong to fail.

Make the name unique by appending the number of times that PKGNAME
is found.

Example:

 vendor/etc/wifi/bdwlan.e30;SYMLINK=vendor/firmware/kiwi/bdwlan.e30
 vendor/etc/wifi/bdwlan.e31;SYMLINK=vendor/firmware/kiwi/bdwlan.e31

Resulting diff:

install_symlink {
       name: "bdwlan_bdwlan_symlink64",
       soc_specific: true,
       installed_location: "firmware/kiwi/bdwlan.e30",
       symlink_target: "/vendor/etc/wifi/bdwlan.e30",
}

install_symlink {
-       name: "bdwlan_bdwlan_symlink64",
+       name: "bdwlan_bdwlan_symlink64_1",
       soc_specific: true,
       installed_location: "firmware/kiwi/bdwlan.e31",
       symlink_target: "/vendor/etc/wifi/bdwlan.e31",
}

Change-Id: Ie9b196e164d89eed16d20b8a9b68f2a6329d5605
1 file changed
tree: 95acdbfebb4de93762700ec0d9e039b3983f9871
  1. templates/
  2. extract_utils.sh
  3. sdat2img.py
  4. sort-blobs-list.py