Conditional tokens for distro and version

Shaun McCance <[email protected]>
Newsgroups gmane.comp.gnome.documentation
Message-ID <[email protected]>
I just added support for querying the distro for conditional processing
in Yelp:

https://git.gnome.org/browse/yelp/commit/?id=176c25

This looks at the os-release file (if present) and sets platform tokens
for the distro id and the distro id+version. On the computer I'm typing
this email on, it sets:

platform:fedora
platform:fedora-21

The same code ought to set tokens to check with the os attribute in
DocBook. I only tested Mallard though.

Question time. The os-release file can contain an ID_LIKE field that
specifies other distro the system behaves sort of like:

http://www.freedesktop.org/software/systemd/man/os-release.html#ID_LIKE=

For example, on my CentOS server, there's this:

ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"

With the current code, you get platform:centos and platform:centos-7.
Should you also get platform:rhel and platform:fedora? Or maybe build
the "like"-ness into the token, e.g. platform:like:rhel and
platform:like:fedora?

What's most useful?

--
Shaun
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.