[systemd-devel] CODENAME field in /etc/os-release
Martin Pitt
martin.pitt at ubuntu.com
Wed Jan 13 05:33:05 PST 2016
Unknown [2016-01-13 14:23 +0100]:
> You shouldn't ask yourself where can i find the codename, but rather
> what do I want to do with it?
> - display it to the user or otherwise describe it in human readable
> text? use PRETTY_NAME if the distribution isn't obvious, or VERSION if
> it is.
> - anything else? are you sure the codename is fit for the job?
On deb-based distributions the code name is used for specifying the
package sources. For example,
deb http://archive.ubuntu.com/ubuntu/ xenial main
where "xenial" is the code name of the distribution. For Debian those
are "wheezy", "jessie", "unstable", and so on.
The request to add a code name to os-release has come up several times
on our side too, and right now we add it as "UBUNTU_CODENAME=", as per
os-release(5). Standardizing to "CODENAME" would be preferrable,
obviously.
> and what would you do on systems not using a codename? for example
> archlinux?
Nothing at all would change for them, as the field wouldn't be
mandatory. Other fields like "VARIANT" don't make sense in a lot of
use cases either, after all.
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
More information about the systemd-devel
mailing list