mk_sdk_repo_xml always adds <sdk:host-os> element

67 views
Skip to first unread message

Chris Sarbora

unread,
Jan 21, 2015, 4:24:25 PM1/21/15
to android-...@googlegroups.com
When producing an SDK or SDK addon, it appears impossible to get the development/build/tools/mk_sdk_repo_xml.sh script to produce a repository xml file that doesn't contain an <sdk:host-os> element when it's using the latest schemas (sys-img-3 in my case). However, that very same schema lists the <sdk:host-os> element as optional - and, in my case, the host OS is irrelevant. I'm only building an emulator system image, not an actual SDK package, so the host OS doesn't matter.

If I manually edit the resulting addon-sys-img.xml file and remove the <sdk:host-os> element, everything works great in the Android SDK Manager.

Is this an oversight in the build system, or am I not setting something up correctly in the SDK building process? In my device/ configuration file, I set both the PRODUCT_SDK_ADDON_NAME and the PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP values, and copy sufficiently-modified manifest.ini and hardware.ini files over via PRODUCT_SDK_ADDON_COPY_FILES. In each of the manifest.ini and source.properties files I set the respective name, vendor, id, api, revision etc values appropriately. Setting the host-os/Archive.HostOs to either blank or 'any' (which mk_sdk_repo_xml.sh purports to take as an acceptable parameter on its command line) results in a schema validation failure, however, since the <sdk:host-os> element can only be an element of the set {'linux', 'macosx', 'windows'}.

It seems to be a fairly trivial fix to the mk_sdk_repo_xml script, but seeing as how this behavior has been around since April 2014 (commit ea40d2f4c5af9744f7140a31d551a55dade128d9 in development/) I'm inclined to think it's not a bug and I'm just using it incorrectly.
Reply all
Reply to author
Forward
0 new messages