Page MenuHomeFreeBSD

Only complain about absolute symlinks if they are within PREFIX/LOCALBASE.
Needs ReviewPublic

Authored by mat on Jun 26 2017, 2:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 7, 3:24 PM
Unknown Object (File)
Sat, Mar 7, 8:59 AM
Unknown Object (File)
Sat, Mar 7, 3:33 AM
Unknown Object (File)
Tue, Mar 3, 7:09 PM
Unknown Object (File)
Tue, Mar 3, 1:19 AM
Unknown Object (File)
Mon, Mar 2, 7:54 PM
Unknown Object (File)
Dec 29 2025, 4:14 AM
Unknown Object (File)
Dec 28 2025, 11:57 PM
Subscribers

Details

Reviewers
None
Group Reviewers
portmgr
Summary

It makes no sense to complain about a symlink to /var.

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 10150
Build 10573: arc lint + arc unit

Event Timeline

I couldn't update this diff. It only offers to create a new revision. So I write in words:

Why do you write

${PREFIX}/*|${LOCALBASE}/*)

and not just

${PREFIX}/*) ?

Installation is done into ${PREFIX}, not ${LOCALBASE}.

Also, you can add another line to the warning clarifying what the user should do:

warn "Use a relative symlink pathname instead"

I couldn't update this diff. It only offers to create a new revision. So I write in words:

Can't parse that one.

Why do you write

${PREFIX}/*|${LOCALBASE}/*)

and not just

${PREFIX}/*) ?

Installation is done into ${PREFIX}, not ${LOCALBASE}.

Yes, but outside of a testing/QA environment, they are the same, and symlinks should be relative within.

Also, you can add another line to the warning clarifying what the user should do:

warn "Use a relative symlink pathname instead"

Right.

  • Add a second line to the relative symlink thing.

Yes, but outside of a testing/QA environment, they are the same, and symlinks should be relative within.

But only ${PREFIX} the location of the installation target. This warning logically pertains only to the installation target folder. So the check should be using only ${PREFIX}/*). It doesn't hurt to have the clause with both, it just doesn't have a particular meaning.

Yes, but outside of a testing/QA environment, they are the same, and symlinks should be relative within.

But only ${PREFIX} the location of the installation target. This warning logically pertains only to the installation target folder. So the check should be using only ${PREFIX}/*). It doesn't hurt to have the clause with both, it just doesn't have a particular meaning.

Of course it does, all symlinks within /usr/local must be relative. The fact that they point to a file within the package or one of its dependencies does not matter.

Look at, say, lang/gcc, all it does is provide 3 symlinks. Right now, it does the right thing, but if I only put PREFIX in there, and it was creating symlinks to LOCALBASE/bin/, it would not be reported as wrong, but it would be.