On 08/13/2011 04:23 AM, Jonathan M Davis wrote:
On Saturday, August 13, 2011 13:18:29 Vladimir Panteleev wrote:
On Sat, 13 Aug 2011 08:08:09 +0300, Jonathan M Davis<[email protected]>

wrote:
Thoughts on std.system.OS? Is there a good reason to leave it? In
principle, it's a nice idea, but I just don't see how it can deliver.
And if it can't deliver, it should be removed IMHO. What do you think?

Why not use uname on non-Windows systems, and report the kernel version?

That's certainly a thought, but that could get entertaining to get the enum
values from that. As long as the various distros are consistent in their
naming schemes between their releases though, that _should_ be possible. That
may be worth trying though.

- Jonathan M Davis

Yup, it's easy:


http://mattiasgeniar.be/2008/10/05/how-to-find-out-your-current-distribution-version/

Between Debian and RedHat and their derivatives (ie Ubuntu and Fedora respectively), you should hit nearly all distributions.

I think /etc/issue is the most reliable place to look for distribution information, and then fall back to the other files.

Reply via email to