androidenv: generate metadata correctly for abi variants

Because a single abi such as x86_64 can have multiple image variants which are not distinguished by checking only the
first tag. Android API 36x were particularly affected as they have both 4kb and 16kb memory page images.

Remove the inconsistent use of `tag` to determine the image path and ID. Instead the path is uniquely determined from
the source XML metadata's location while the `id` uses part of Google's `path` ID.

The `repo.json` is updated incrementally and the last version which was not affected by these issues was `a137f263af92`
so it has been regenerated based on that version.
This commit is contained in:
Rohan
2026-07-20 21:30:35 +12:00
parent 7a8d85ea91
commit 9e22abf3f7
4 changed files with 2151 additions and 8246 deletions

View File

@@ -116,7 +116,7 @@ options:
For each requested system image we can specify the following options:
* `systemImageTypes` specifies what kind of system images should be included.
Defaults to: `default`.
Defaults to: `google_apis`, `google_apis_playstore`, `google_apis_ps16k` and `google_apis_playstore_ps16k`.
* `abiVersions` specifies what kind of ABI version of each system image should
be included. Defaults to `armeabi-v7a` and `arm64-v8a`.

View File

@@ -140,6 +140,8 @@ in
systemImageTypes ? [
"google_apis"
"google_apis_playstore"
"google_apis_ps16k"
"google_apis_playstore_ps16k"
],
abiVersions ? [
"x86"

File diff suppressed because it is too large Load Diff

View File

@@ -158,7 +158,7 @@ def package_revision package
when 'sys-img:sysImgDetailsType'
codename = text type_details.at_css('> codename')
api_level = text type_details.at_css('> api-level')
id = text type_details.at_css('> tag > id')
_, _, id, _ = package['path'].split(';')
abi = text type_details.at_css('> abi')
revision = ''
@@ -342,7 +342,7 @@ def parse_package_xml doc
[licenses, packages, extras]
end
def parse_image_xml doc
def parse_image_xml loc, doc
licenses = get_licenses doc
images = {}
@@ -357,7 +357,7 @@ def parse_image_xml doc
obsolete &&= package['obsolete']
type_details = to_json_collector package.at_css('> type-details')
revision_details = to_json_collector package.at_css('> revision')
archives = package_archives(package) {|url| image_url url, components[-2]}
archives = package_archives(package) {|url| image_url url, loc}
dependencies_xml = package.at_css('> dependencies')
dependencies = to_json_collector dependencies_xml if dependencies_xml
@@ -503,7 +503,8 @@ opts[:packages].each do |filename|
end
opts[:images].each do |filename|
licenses, images = parse_image_xml(Nokogiri::XML(get(filename)) { |conf| conf.noblanks })
loc = URI.parse(filename).host
licenses, images = parse_image_xml(loc, Nokogiri::XML(get(filename)) { |conf| conf.noblanks })
merge result['licenses'], licenses
merge result['images'], images
end