bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] mktempd: silence dd usage


From: Eric Blake
Subject: Re: [PATCH] mktempd: silence dd usage
Date: Fri, 02 Dec 2011 06:24:19 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

On 12/02/2011 06:18 AM, Pádraig Brady wrote:
> On 12/02/2011 01:06 PM, Eric Blake wrote:
>> On 12/02/2011 03:24 AM, Jim Meyering wrote:
>>> Eric Blake wrote:
>>>> When running a testsuite on FreeBSD, I saw a lot of:
>>>>
>>>
>>> For the record, what version of FreeBSD was that?
>>> I see that at least 9.0-BETA3 does have /usr/bin/mktemp.
>>
>> freebsd64 8.2-RELEASE
> 
> According to this page FreeBSD has `mktemp -d` for ages.
> http://www.freebsd.org/cgi/man.cgi?query=mktemp&apropos=0&sektion=0&manpath=FreeBSD+8.2-RELEASE&arch=default&format=html
> I confirmed it's available on os x too

And I indeed see:

which mktemp
/usr/bin/mktemp

But the mktempd script requires -p:

  d=`env -u TMPDIR mktemp -d -t -p "$destdir" "$template" 2>/dev/null` \

and FreeBSD mktemp lacks that:

usage: mktemp [-d] [-q] [-t prefix] [-u] templat ...
       mktemp [-d] [-q] [-u] -t prefix

in other words, since the mktempd usage appears to be hard-coded to GNU
mktemp, it explains why the FreeBSD mktemp fails the test and we fall
back to dd.

Since mktemp is not standardized, perhaps we should try multiple
invocation styles, if we can make BSD's mktemp give us the results we
want without having to fall back to dd.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]