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)
Feb 4 2024, 4:01 PM
Unknown Object (File)
Dec 20 2023, 7:47 AM
Unknown Object (File)
Dec 13 2023, 5:09 PM
Unknown Object (File)
Nov 19 2023, 2:10 PM
Unknown Object (File)
Aug 31 2023, 12:58 PM
Unknown Object (File)
Aug 28 2023, 6:44 PM
Unknown Object (File)
Jun 30 2023, 6:28 PM
Unknown Object (File)
May 29 2023, 5:13 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.