DJ Delorie <[email protected]> writes:

> Collin Funk <[email protected]> writes:
>> I'd prefer that people just fix the buggy programs that use 'uname -p'.
>
> I agree, but not everyone has the luxury of "just fixing" it.
>
> Until then, uname offers and documents the option, it should try to
> return *something* usable.

Shouldn't that be the distribution's job to fix, then? They were added
for Solaris compatibility and have only been useful on GNU/Linux because
distributions patched them in ways that were not compatible with each
other.

>> Some notes on various distributions, since these options have
>> unfortunately caused me a lot of wasted time.
>
> So we have three options:
>
> 1. Do nothing, people keep complaining, you keep getting wasted time.
>
> 2. Remove the option completely, and exit with a non-zero exit error if
>    the user tries to use it.
>
> 3. Return something reasonable and easy so people are happy.
>
> I suppose a fourth:
>
> 4. Return something overly specific so that people still have to fix
>    their scripts, but -p now returns something even more useful.  (This
>    is what I'm contemplating for glibc, since we need to know more for
>    ifuncs to work.)
>
> You've been doing #1.  I'm proposing #3.  If you really want people to
> fix their scripts, you need to do #2 or #4, but they'll hate you for it ;-)
>
> I suppose a fifth option:
>
> 5. Have -p and -i print "Stop using -p/-i!  They're stupid!  Use -m
> instead!"  :-)

I think I see a different outcome from option 3, besides making people
happy. By having 'uname -ip' return:

    x86_64 x86_64

Wouldn't we just be encouraging people to write scripts that aren't
portable to RHEL 10 and decades of Debian releases, Gentoo, etc.? Why do
that when 'uname -m' exists? What happens if we later try to use
/proc/cpuinfo (*) to get more meaningful information about the CPU, as
one would expect from those options? Will we even be able to do this, or
will it break too many scripts?

(*) I'm open to the idea. But I don't know how long the file has
existed, or if it is guaranteed not to change its format.

Collin

Reply via email to