Enji Cooper (yaneurabeya) wrote in 
<b950ada7-6f85-43ca-a3db-577928da3...@gmail.com>:
> On Sep 17, 2025, at 1:32 PM, Lexi Winter <i...@freebsd.org> wrote:
> > packages: Mark all sets as vital
>
> I actually wouldn’t consider `src` or `tests` to be vital (many
> users don’t install them on their systems). Is there a reason
> why they should be considered vital that I’m not aware of? I’ve
> not been paying a ton of attention to work being done in the
> pkg-base space, so I might have missed some important points.

"vital" doesn't mean they have to be installed, it only means that once
they are installed, they can only be removed explicitly (using -f):

        # pkg remove freebsd-set-tests
        Checking integrity... done (0 conflicting)
        The following package(s) are locked or vital and may not be removed:

                FreeBSD-set-tests

originally i only marked "minimal" and "base" as vital, but based on
review feedback, we decided to mark all the sets as vital for now.  the
reason is to avoid something like this:

        # pkg install freebsd-set-devel
        # pkg remove freebsd-lldb       # this also removes freebsd-set-devel

          ... 6 months later ...

        # pkg autoremove
          (now all the other packages installed by freebsd-set-devel
          are also removed.)

marking the sets as vital means that users have to explicitly opt-in to
removing the set if they remove a dependency of the set, which avoids
this exciting behaviour.

there is a pkg(8) issue that means this doesn't work quite as well as it
should do: https://github.com/freebsd/pkg/issues/2517, however, i still
feel this is better than the alternative.

Attachment: signature.asc
Description: PGP signature

Reply via email to