[Toybox] mktemp breaks the aboriginal build.

Rob Landley rob at landley.net
Sun Sep 2 18:12:28 PDT 2012


The mktemp command is failing during the kernel build, because it's
going "mktemp /tmp/blah.xxxxxx" and we're turning that into
"/tmp///tmp/blah.xxxxxx". The logic's a bit wrong here.

It's also... fiddly.  I looked at the LSB and it doesn't specify -p at
all, just -q and -u (neither of which we do, one of which is clearly a
bad idea). So I experimented a bit:

$ mktemp
/tmp/tmp.Uhlv2A3tzR
$ mktemp file
mktemp: too few X's in template `file'
$ mktemp file.XXX
file.uwg
$ mkdir woot
$ mktemp -p woot
woot/tmp.DpCWU04Uno
$ mktemp -p woot bork/wah.XXXXXX
mktemp: failed to create file via template `woot/bork/wah.XXXXXX': No
such file or directory
$ mktemp -p woot /tmp/wah.XXXXXX
mktemp: invalid template, `/tmp/wah.XXXXXX'; with --tmpdir, it may not
be absolute

So: if you don't specify anything, /tmp/tmp.* Specify a file, ./file.
Specify -p dir then dir/tmp.*. Specify -p and an absolute path, it
complains.

That last one is standard FSF "everything is a special case" coding and
I think we can just degrade to relative path and not mind some extra
consecutive // chars.

Anyway, just thought I'd mention it.

Rob
-- 
GNU/Linux isn't: Linux=GPLv2, GNU=GPLv3+, they can't share code.
Either it's "mere aggregation", or a license violation.  Pick one.

 1346634748.0


More information about the Toybox mailing list