Page MenuHomeFreeBSD

Framework: Allow setting the 'vital' flag from a port
ClosedPublic

Authored by arrowd on Jan 27 2025, 11:26 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 14, 4:12 PM
Unknown Object (File)
Fri, Nov 14, 1:47 PM
Unknown Object (File)
Fri, Nov 14, 1:47 PM
Unknown Object (File)
Fri, Nov 14, 11:05 AM
Unknown Object (File)
Sep 14 2025, 8:49 AM
Unknown Object (File)
Sep 14 2025, 2:00 AM
Unknown Object (File)
Sep 13 2025, 11:45 PM
Unknown Object (File)
Sep 8 2025, 8:35 PM
Subscribers

Details

Summary

Rationale for this change is following.

In our project we have a large meta-port that represents all the 3rd-party
software that makes up our distribution. This is sort of pkgbase, but at the
higher level.

We want to make sure this metapackage and all its dependents are never removed,
hence need to set the vital flag from the port.

This feature is not intended to be used in the main branch, but may be useful
for enterprise consumers of the Ports tree. Maybe the knob should be even named
_VITAL, bikeshedding is welcome.

Test Plan

make create-manifest contains vital : true for a port containing VITAL=yes

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

arrowd created this revision.

We should probably also add a comment in bsd.port.mk which clearly state this should not be used directly in the ports tree, but that is another story

This revision is now accepted and ready to land.Jan 27 2025, 12:50 PM

I have the same use case and setup on my systems with meta packages. I had manually done pkg set -v1 on the packages but some recent change means I need to use this port flag now.

If it gets directly used in the ports tree we can just add a commit hook to block it. Probably should anyway.