[Libosinfo] [osinfo-db PATCH 2/7] ubuntu: Include <codename> in <name>

Daniel P. Berrangé berrange at redhat.com
Wed Apr 17 17:44:56 UTC 2019


On Wed, Apr 17, 2019 at 07:23:40PM +0200, Andrea Bolognani wrote:
> On Wed, 2019-04-17 at 17:58 +0100, Daniel P. Berrangé wrote:
> > On Wed, Apr 17, 2019 at 06:38:55PM +0200, Andrea Bolognani wrote:
> > > Actually, the above is not quite correct: even if an application
> > > wanted to build the display string from scratch, they would not be
> > > able to do so because there is no field anywhere containing the
> > > strings "MacOS X", "Debian" or "Ubuntu".
> > 
> > That's by design, because the product name is not a simple
> > concatenation of a base name + version number. It is essentially
> > an opaque string in its own right, arbitrarily decided by the
> > vendor.
> 
> You could argue that the vendor-chosen for the latest Debian release
> is "Debian 9 (stretch)" based on
> 
>   https://www.debian.org/releases/
> 
> and similarly for Ubuntu, but it's definitely not as clear-cut as
> it might be with the likes of Windows and macOS :)

The ISO images for both just called then "Debian 9" or "Ubuntu 18.04"
in the ISO metadata. The Debian graphical installer also calls itself
"Debian 9". Not tried the Ubuntu installer.

> > > There's one more detail to consider: even if the application was
> > > willing to construct the display string itself, how would it know
> > > that it's "Ubuntu Server 18.04 LTS" but "Fedora 29 Workstation"?
> > > They'd have to write code for it, and end up not handling all cases
> > > correctly... If we just provide the information is osinfo-db, on
> > > the other hand, it's just a quick API call away.
> > 
> > The application can just display <name> field as is,
> > either the top level name from the OS, or the variant
> > name if they have identified a specific varaint.
> > 
> > They can optionally append a codename string to that
> > when displaying it.
> 
> That would result both in "Debian 9 (stretch)" (good) and "macOS
> Mojave (Mojave)" (bad), though. So we should probably not recommend
> applications do that.

Looks like apps should just stick with <name> by default. Apps that list
os entries can optionally output a codename if wish.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the Libosinfo mailing list