trace mode fails with sh: /usr/bin/tar: No such file or directory

Clemens Lang cal at
Sun Dec 17 23:20:35 UTC 2017


On Mon, Dec 18, 2017 at 08:05:17AM +1100, Joshua Root wrote:
> On 2017-12-18 07:54 , Ken Cunningham wrote:
> >> On Dec 17, 2017, at 12:52 PM, Joshua Root <jmr at> wrote:
> >> On 2017-12-18 07:18 , Ken Cunningham wrote:
> >>> I haven’t been able to use trace mode to test port installs
> >>> because of the following error. Am I doing something wrong?
> >>
> >> Aside from running master? :)
> >>
> >> Welcome to the bleeding edge.
> > 
> > thanks for  the note. I assumed you guys were all over it.
> > 
> > A simplish workaround for now is to extract it first, and then build
> > it in trace mode. I should have thought of doing that sooner ;>
> To be more concrete, it's an interaction between a recent change on
> master to use copyfile for the SIP workaround, and something that
> changed in the 10.13.2 update.

We debugged this on IRC recently. Turns out the culprit is

/usr/bin/tar is a symlink to bsdtar. copyfile(3) copies the symlink, the
previous method opened the file (dereferencing the symlink) and copied
its contents.

When the symlink is copied (because copyfile(3) is used), the
destination of the symlink is not copied, which eventually leads to file
not found.

You can locally revert this commit for now.


More information about the macports-dev mailing list