RPM Community Forums

Mailing List Message of <popt-devel>

Re: echo incompatibility (was Re: Allow equal after a short option)

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 10 Mar 2008 - 00:01:18 CET
Message-Id: <5A646CBC-5FE8-4D77-A524-3FE34296B75F@mac.com>

On Mar 9, 2008, at 6:22 PM, Wayne Davison wrote:

> On Sun, Mar 09, 2008 at 10:51:42AM -0400, Jeff Johnson wrote:
>> [jbj@wellfleet popt]$ /bin/echo --foo --bar
>> --bar
>> [jbj@wellfleet popt]$ /bin/echo -- --foo --bar
>> --foo --bar
>
> OK, Let's hope that your echo will not drop anything if the first arg
> passed to it is a non-option (such as "args:").  If so, the attached
> patch should work for everyone (it does for me).
>

Clever hack to change the 1st arg to echo ...

However, not-POSIXLY_CORRECT rearrangements _SHOULD_ cause
argument permutation with, say,

     /bin/echo args:  A -b C -d --foo --bar

afaict that may exhibit the same failure lossage as before. Dunno,  
non-POSIXLY_CORRECT
echo(1) argument processing definition(s) I'll leave to LSB-53,  
"unspecified" behavior
is gud enuf for me.

The better fix (for me as well as popt) is to get a non-Fedora  
enhanced /bin/echo ... todo++.

73 de Jeff
Received on Mon Mar 10 00:01:30 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.