Page MenuHomeFreeBSD

nanobsd: Prefer tgt_dir2symlink() to create symlinks
ClosedPublic

Authored by jlduran on Feb 1 2025, 4:24 AM.
Tags
None
Referenced Files
F143390962: D48783.diff
Thu, Jan 29, 8:27 PM
Unknown Object (File)
Tue, Jan 27, 7:28 PM
Unknown Object (File)
Sun, Jan 25, 1:27 AM
Unknown Object (File)
Thu, Jan 22, 12:42 PM
Unknown Object (File)
Wed, Jan 21, 8:05 PM
Unknown Object (File)
Tue, Jan 20, 1:33 PM
Unknown Object (File)
Sun, Jan 18, 5:03 PM
Unknown Object (File)
Sun, Jan 18, 2:24 PM
Subscribers
None

Details

Summary

Prefer tgt_dir2symlink() to create symlinks, as it has the benefit of
appending the entry to the metalog file.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jlduran created this revision.
This revision is now accepted and ready to land.Feb 1 2025, 4:46 AM
emaste added inline comments.
tools/tools/nanobsd/defaults.sh
552

it's a shame that tgt_dir2symlink is backwards

tools/tools/nanobsd/defaults.sh
552

It's only used in one place. We can fix it.
We can change the name too (maybe tgt_symlinkdir) in case we're worried about downstreams using it.

I blame ln for seeming backwards all these years for adopting the 'cp' paradigm. I never fail to be confused by this, at least once a year anyway.

552

Or maybe tgt_ln :)

tools/tools/nanobsd/defaults.sh
552

You are both right. I'm not going to pretend I have not tried it backwards.

  • I'll sink tgt_dir2symlink (move it to legacy.sh), and leave it untouched
  • I'll create a new tgt_ln function and use that instead