[lsb-discuss] language APIs for information from lsb_release?
Wichmann, Mats D
mats.d.wichmann at intel.com
Tue Mar 18 14:34:19 PDT 2008
>[sorry if this is the wrong way to start a request/discussion]
Hard to think of a better way :-)
>lsb_release is fine when you are working with a shell, but seems to be
>when used by interpreters on every startup (e.g. the python interpreter
>returning as sys.platform some more specific information, or a java vm
>identifying the platform more accurately). Currently these
interpreters use the
>availabilty of an internal file on Debian, Ubuntu and other derivatives
>$ cat /etc/lsb-release
>DISTRIB_DESCRIPTION="Ubuntu hardy (development branch)"
>which is read by at least development versions of python and
>Could such a file be required by the standard, or should APIs for some
I believe the original idea was to only specify the
lsb_release command so that the implementation of how
the data was stored did not have to be nailed down.
The Sample Implementation of lsb_release actually does
what you describe on Debian-based systems, on others
it derives the information elsewhere. For example, if
it finds an /etc/redhat-release it takes some information
from there. Fedora/RHEL does not have an /etc/lsb-release.
That said, if there are benefits such as you describe to
standardizing the file I don't see any problem with
pursuing that. It's the intent of the LSB to have available
a runtime check like this, and I don't think we even
thought of that issue when Perl and Python were added
to the specification.
More information about the lsb-discuss