[MacPorts] #37834: Set TMPDIR

MacPorts noreply at macports.org
Thu Feb 28 00:10:03 PST 2013


#37834: Set TMPDIR
---------------------------+--------------------------------
  Reporter:  ryandesign@…  |      Owner:  macports-tickets@…
      Type:  enhancement   |     Status:  closed
  Priority:  Normal        |  Milestone:  MacPorts Future
 Component:  base          |    Version:  2.1.2
Resolution:  fixed         |   Keywords:  haspatch
      Port:                |
---------------------------+--------------------------------
Changes (by ryandesign@…):

 * status:  new => closed
 * resolution:   => fixed
 * milestone:   => MacPorts Future


Comment:

 Replying to [ticket:37834 ryandesign@…]:
 > Clang has a bug (<rdar://problem/12479432>) in which the temporary file
 names it creates while compiling are predictable (i.e. based on the name
 of the file being compiled).

 This is not quite accurate. The temporary file names do have a random
 suffix. The problem is that when a directory exists in $TMPDIR whose name
 is the basename of the file being compiled, then clang tries to make a
 unique file inside that directory instead. So if a source file called
 manifest.c is being compiled (as is the case with the ccache port), then
 clang will ordinarily try to make a temporary file $TMPDIR/manifest-XXXXXX
 (where "X" is a random character) but if the directory $TMPDIR/manifest/
 exists then it will try to make a temporary file $TMPDIR/manifest/XXXXXX
 and this fails if that directory is owned by a different user. And
 MacPorts-compiled files will be owned by the macports user but other
 things in $TMPDIR aren't likely to be, which is why this keeps coming up.

 Replying to [ticket:37834 ryandesign@…]:
 > (The directory /tmp/manifest existed because some 3rd-party installer
 package put it there during installation.)

 I found out it's actually the auto-update checking of the DivX software
 package, which seems to run quite frequently (though it's told to only run
 weekly). So this directory keeps coming back even after I get rid of it.
 Of course it's a bug for DivX to be creating predictably-named temporary
 files, but I can only fix one thing at a time. :)

 Replying to [comment:7 ryandesign@…]:
 > I think the attached patch is working for me, but I'd appreciate if
 others would try it and let me know their results, or any comments or
 improvements on the patch.

 I've been running with this patch for some weeks with no ill-effects. So
 I'm committing it in r103518.

-- 
Ticket URL: <https://trac.macports.org/ticket/37834#comment:10>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list