Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Mar 2004 18:30:45 +1000
From:      Stephen McKay <smckay@internode.on.net>
To:        harti@freebsd.org
Cc:        Stephen McKay <smckay@internode.on.net>
Subject:   Re: posix ps (was Re: Adding `pgrep' and `pkill' to /usr/bin) 
Message-ID:  <200403290830.i2T8Ujsv006376@dungeon.home>
In-Reply-To: <20040329091900.Y12618@beagle.fokus.fraunhofer.de> from Harti Brandt at "Mon, 29 Mar 2004 09:38:05 %2B0200"
References:  <p0602046abc879c5fe2f9@[128.113.24.47]> <20040325070120.GA67497@VARK.homeunix.com> <1a9c01c41359$b3da45e0$7890a8c0@dyndns.org> <p06020494bc8a5738af2f@[128.113.24.47]> <200403280808.i2S88aJ7016011@dungeon.home> <20040328184244.I10175@beagle.fokus.fraunhofer.de> <200403290042.i2T0g2sv003657@dungeon.home> <20040329091900.Y12618@beagle.fokus.fraunhofer.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, 29th March 2004, Harti Brandt wrote:

>Think of 'ls -o'. -o is taken by posix to mean the same as '-l' but
>without showing the group. FreeBSD ls instead takes it to show file flags.
>This is a more obvious case where you want the selection.

I had promised to leave this debate, having said what I thought needed to
be said.  But this (and your subsequent message) implies that there are
people who want to add $PERSONALITY to many basic FreeBSD utilities, not
just in ps.

This is a very bad road to take.  Far from solving portability difficulties,
it guarantees those difficulties into the indefinite future.

If we need posix compatibility (and this should be a separate debate), then
we take the pain and change the 'ls -o' option.  For one release cycle the
option still works in the old manner but outputs a warning.  In the next
major release, it changes to the posix flavour.  Bang.  Problem solved.
Adding a hidden variable just makes things more complicated and guarantees
the pain continues forever.  People *will* set this variable inappropriately,
and it *will* be a source of problems.

It won't even be safe for end users as they will learn a PERSONALITY rather
than FreeBSD.  They will have to learn all such personalities in order to
be competent.  I understood the posix push as an attempt at simplification
of the unix-like group of operating systems.

>Also if a have dozens of scripts which have worked on BSD for a long time,
>I'm ready to put a PERSONALITY=BSD on top of them, but I don't think I
>want to go through them line by line to find out which of the utilities is
>now SysV conform and needs another set of switches or for which utility I
>have to use which switch to get the BSD syntax. THIS negatively
>impacts the use in scripts.

My view is the complete opposite of this.  Make the upcoming change very
obvious with very loud warnings.  When you upgrade to the next major
release of FreeBSD, you port the scripts you want to use and leave behind
the ones you no longer need.  You can stay safely on an old version of
FreeBSD for years if you need that time for porting.

I am a strong proponent of backward compatibility.  But in cases where
it cannot be done without a conflict, then the "Warning" followed by
"Big Axe" method is the right approach.  As pioneered by our Danish
committers if memory serves. :-)

Stephen.

PS Should the CC list be truncated now?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403290830.i2T8Ujsv006376>