darwin: preserve hardlinks on codesign/install_name_tool#47808
darwin: preserve hardlinks on codesign/install_name_tool#47808
Conversation
|
Hey @haampie, I tried out this patch, and it does not currently work on it's own. I tried to debug when the hard-link gets broken, and to me it seems like it happens already when the I tried adding the same temporary file mechanism to the I have a patch for this in this gist. |
|
Hm, forgot that we used that. That's rather annoying, install name tool technically has no good reason to modify files out of place. Maybe a regression in the tool? |
|
It could be. It's not obvious to me how If it is a regression, would you want to gate the workaround based on tool version? Otherwise, is there any reason not to apply the workaround? |
|
the workaround is fine, just wish we didn't have to. if it's a regression we should report a bug with xcode. |
|
Need to wrap more calls to |
23eef29 to
d058a41
Compare
closes #47691
codesignandinstall_name_toolcreate a new inodes, which breaks hardlinks. So instead run it on a file copy and copy contents back to the original file.