severity 752664 wishlist
tags 752664 wontfix
thanks

On Wed, Jun 25, 2014 at 07:20:15AM -0500, woodqs wrote:
I have removed the nonstandard GNU extension "-o" and refactored options referring to operating 
system implementation so that they no longer make a distinction between "kernel" and 
"operating system." POSIX defines uname in a way that does not make this distinction.

POSIX does very little to define uname, but does recommend that it's basically useless. (Understand that uname is defined in terms of historical systems and is structured in a way that does not map well to modern systems--hence SUS's recommendation to simply not rely on it.) The only value it does have is that, insofar as uname is consistent on a particular platform, an application can make some limited assumptions based on the output. In this case, there are additional (basically useless) options available due to quibbles over the concept of "kernel" as distinct from "operating system". I'm not inclined to make Debian's uname differ from that found on other Linux distributions in an effort to make the vocabulary of its command line options conform to one interpretation of a particular concept or another--especially since there's no practical benefit (as far as I can see) to making the change: no sane application should be using the -o option at all, and the -s/-r options clearly correspond only to the kernel. (Note that changing -s to reflect something other than the kernel is a non-starter as it will break too many existing scripts.)

My own recommendation is that uname be used only as:

1) "uname" or "uname -s", for the very limited purpose of allowing a script to portably distinguish a Linux-based system of some sort from some other platform as OpenBSD, etc., to be used as an entry point into platform-specific code. (The "Linux" branch may well need additional distribution-specific logic.)

2) "uname -r", to easily see the kernel version if there's some reason to do so (many such uses historically would be better implemented as feature tests)

3) "uname -a" to give a user a general idea of what kind of system he's using.

Once a script has found that it's running on something that's vaguely "Linux", and pulled out the kernel version, there are more appropriate, accurate, and reliable mechanisms for determining anything else that uname might possibly tell it.

Mike Stone


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to