Skip to content

Add new APIs to report multiple media/tree matches

Daniel P. Berrangé requested to merge berrange/libosinfo:many-tree-media into master

We have had a long term problem with OS releases not always have unique metadata in the ISO PVD tables. We've tried to workaround this by including the volume size in the metadata. Sometimes that is viable, but other times it is too painful to consider. Today Windows 11 has put us in an impossible situation

  • All Win11 ISOs have same PVD data as Win10 ISOs
  • There are 38 language variant ISOs
  • We can only download latest spins of the ISOs and they've already been refreshed once for Win11

To add volume-size info would need us to add 100's of entries, and we simply can't do it because we don't even have access to all the ISOs microsoft has published.

I looked at the filepath tables and unfortunately there's nothing attractive that has the windows version in its name. We could pick some random file that doesn't exist in Win10, but it feels fragile.

This new approach simply accepts reality that media/tree matching can not be guaranteed to provide a unique answer.

We add APIs that return an OsinfoTreeList / OsinfoMediaList containing all matches.

The previous APIs would filter our rolling releases if they matched media/treeinfo, and a non-rolling release also matched. This new API does NOT do that filtering.

Similarly it would filter out any matches for arch=all, if there was an arch=$ARCH match, even if the OS were different. Again his new API does NOT do that filtering.

The new APIs return all OS which have at least one matching media/tree. Note each OS will only be returned once, even if it has multiple matching media.

The intent here is that a mgmt app now has the option to provide more useful behaviour. It can present the user with the list of matches and ask them to pick, or it can just pick the newest OS, or it can do whatever it wants.

Edited by Daniel P. Berrangé

Merge request reports