Page MenuHomeFreeBSD

Don't delete the source file when installing links on case-insensitive file systems

Authored by arichardson on Aug 17 2018, 9:11 AM.



If the name of the link is the same except for case, use install -S to
avoid removing the destination file (which will be the source on a
case-insensitive file system) before creating the link.
I've also modified to skip the ln call if the file names are
the same in lower case and test -ef (same file) returns true.

Without this change installworld fails on MacOS in libcrypto (due to hmac.3
-> HMAC.3) and sendmail (mail -> Mail)

Test Plan

installworld works on MacOS (with -DNO_ROOT)

Diff Detail

Lint OK
No Unit Test Coverage
Build Status
Buildable 20873
Build 20249: arc lint + arc unit

Event Timeline

arichardson created this revision.Aug 17 2018, 9:11 AM

Rebased and fixed typo in info message

brooks accepted this revision.Feb 27 2019, 10:41 PM

Looks good to me.

This revision is now accepted and ready to land.Feb 27 2019, 10:41 PM

This seems incomplete. It's just fixing the specific cases having problems today?
Why shouldn't we mandate enabling case-sensitivity on the filesystem first?

And the solution here is just avoiding installing files so it seems to be producing an incorrect result.


Why not here?