Page MenuHomeFreeBSD

nanobsd: Prefer tgt_dir2symlink() to create symlinks
AcceptedPublic

Authored by jlduran on Sat, Feb 1, 4:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 8, 10:34 AM
Unknown Object (File)
Sat, Feb 8, 5:14 AM
Unknown Object (File)
Wed, Feb 5, 11:54 PM
Unknown Object (File)
Wed, Feb 5, 5:26 PM
Subscribers
None

Details

Reviewers
emaste
imp
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 62194
Build 59078: arc lint + arc unit

Event Timeline

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

it's a shame that tgt_dir2symlink is backwards

tools/tools/nanobsd/defaults.sh
548

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.

548

Or maybe tgt_ln :)

tools/tools/nanobsd/defaults.sh
548

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