Bug 254174

Summary: pkgbase: uninstalling dbg or other variants of "vital" packages is impossible
Product: Base System Reporter: Mina Galić <me>
Component: miscAssignee: freebsd-pkgbase (Nobody) <pkgbase>
Status: Closed FIXED    
Severity: Affects Only Me CC: manu, pkgbase
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Mina Galić 2021-03-09 22:07:19 UTC
meena@beastix ~> sudo pkg remove FreeBSD-utilities-dbg-lib32
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        FreeBSD-utilities-dbg-lib32: 14.snap20210306210736

Number of packages to be removed: 1

The operation will free 26 MiB.

Proceed with deinstalling packages? [y/N]: y
pkg: Cannot delete vital package: FreeBSD-utilities-dbg-lib32!
pkg: If you are sure you want to remove FreeBSD-utilities-dbg-lib32,
pkg: unset the 'vital' flag with: pkg set -v 0 FreeBSD-utilities-dbg-lib32
meena@beastix ~ [3]>

i do not consider -dbg packages vital
heck, i don't think i'd consider lib32 packages vital!

most, if not all packages we split off from vital packages can be marked as non-vital
Comment 1 commit-hook freebsd_committer 2021-03-28 10:18:34 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=1c1ff7979571bf07c05a48e857b7b285b037410f

commit 1c1ff7979571bf07c05a48e857b7b285b037410f
Author:     Mina Igalic <me@igalic.co>
AuthorDate: 2021-03-28 10:16:45 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2021-03-28 10:18:09 +0000

    pkgbase: make only vital packages vital, not their sub-packages

    make "vital" a replaceable, which defaults to "false" and only set it for
    the main clib, utilities and runtime packages, not their sub-packages

    PR: 254174
    Differential Revision:  https://reviews.freebsd.org/D29224

 release/packages/generate-ucl.sh | 10 +++++++++-
 release/packages/jail.ucl        |  2 +-
 release/packages/runtime.ucl     |  2 +-
 release/packages/template.ucl    |  1 +
 release/packages/utilities.ucl   |  2 +-
 5 files changed, 13 insertions(+), 4 deletions(-)
Comment 2 Mina Galić 2021-04-14 08:46:50 UTC
shouldn't this be MFCed?