GNU bug report logs -
#15425
mktemp - conflicting options affected by ENV
Previous Next
Full log
Message #28 received at 15425 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 09/26/2013 01:59 PM, Pádraig Brady wrote:
> On 09/26/2013 05:36 AM, Jim Meyering wrote:
>>> I'll push this soon, unless there are objections
>>> to the above "undeprecation" of -p.
>>
>> Go for it. That seems best. Thank you.
>
> That -p = --tmpdir aspect is OK.
>
> But on consideration, erroring on -p,-t is too harsh.
> Really -t is just a mode to operate in,
> i.e. enforce no '/' in template, and give precedence
> to TMPDIR over --tmpdir
> Hopefully the attached documentation only patch
> suffices to clear things up.
>
> BTW I noticed this variation which could be
> used to generate passwords or something:
>
> $ mktemp -u -t -p '' XXXXXXXX
> L5awccB1
>
> However without -t, '/tmp/' is inserted.
> I'm inclined to change to not output '/tmp/' here?
>
> $ mktemp -u -p '' XXXXXXXX
> /tmp/L5awccB1
Actually the best way to generate random chars like the above
is to avoid -p entirely. So I've made -t consistent and
output /tmp/... in the above case.
Also I matched the -q option up with the documentation.
The documented functionality made sense, which was to
suppress only I/O errors, but the existing code suppressed
almost all errors, including most usage errors.
So I fixed that up in a second patch.
Both updated patches are attached,
and already pushed.
thanks,
Pádraig.
[mktemp-match-docs.patch (text/x-patch, attachment)]
This bug report was last modified 11 years and 227 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.