tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Improve STRIP_DEBUG



* On 2018-01-02 at 17:54 GMT, Alistair Crooks wrote:

> > ...
> > [ ! -h "$${f}" ]
> >
> 
> I think we're going to have to look for some abstraction for test(1)
> options - NetBSD (-current) has:
> 
>    -h file
>           True if file exists and is a symbolic link.
>    -L file
>           True if file exists and is a symbolic link. This operator is
> retained for compatibility with previous
>           versions of this program. Do not rely on its existence; use
> -h instead.
> 
> while FreeBSD (-current) has:
> 
>      -h file       True if file exists and is a symbolic link.  This operator
>                    is retained for compatibility with previous versions of
>                    this program.  Do not rely on its existence; use -L
>                    instead.
>      -L file       True if file exists and is a symbolic link.

Fun!  It can't be a co-incidence that the text is identical.  Maybe
someone copy-pasted onto the wrong argument?

Either way, -h is kept as the only one which was supported on older
test(1) programs on SunOS, and the chances of one of the above
actually removing the option seems small (no advantage, why bother?)

> > ...
> > + tmp_f="$${f}.XXX"; \
> > ...
> 
> I'd be happier, in these security-concious days, with using mktemp(1)
> across the board, and bootstrapping if necessary, or maybe even
> "mktemp -d"

Yeh I thought it was a bit weird, and wanted to at least change it to
'.$$' which we use in lots of other places, but wanted to keep those
types of changes logically separate.

Thanks,

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index