Upgrading a pkgbase system, I lost /etc/group and /etc/master.passwd, among other files, because pkg split the FreeBSD-runtime upgrade job: - FreeBSD-runtime-dev-lib32-14.snap20220509053256 [FreeBSD-base] conflicts with FreeBSD-runtime-dev-14.snap20220503053224 [installed] on /usr/libdata/pkgconfig/zlib.pc - FreeBSD-runtime-dev-lib32-14.snap20220509053256 [FreeBSD-base] conflicts with FreeBSD-runtime-dev-14.snap20220509053256 [FreeBSD-base] on /usr/libdata/pkgconfig/zlib.pc - FreeBSD-libmagic-dev-lib32-14.snap20220509053256 [FreeBSD-base] conflicts with FreeBSD-libmagic-dev-14.snap20220503053224 [installed] on /usr/libdata/pkgconfig/libmagic.pc - FreeBSD-libmagic-dev-lib32-14.snap20220509053256 [FreeBSD-base] conflicts with FreeBSD-libmagic-dev-14.snap20220509053256 [FreeBSD-base] on /usr/libdata/pkgconfig/libmagic.pc - FreeBSD-liblzma-dev-lib32-14.snap20220509053256 [FreeBSD-base] conflicts with FreeBSD-liblzma-dev-14.snap20220503053224 [installed] on /usr/libdata/pkgconfig/liblzma.pc - FreeBSD-liblzma-dev-lib32-14.snap20220509053256 [FreeBSD-base] conflicts with FreeBSD-liblzma-dev-14.snap20220509053256 [FreeBSD-base] on /usr/libdata/pkgconfig/liblzma.pc - FreeBSD-hyperv-tools-14.snap20220509053256 [FreeBSD-base] conflicts with FreeBSD-runtime-14.snap20220503053224 [installed] on /etc/devd/hyperv.conf ... [1/389] Deinstalling FreeBSD-runtime-14.snap20220503053224... [1/389] Deleting files for FreeBSD-runtime-14.snap20220503053224: 100% [2/389] Deinstalling FreeBSD-runtime-dev-14.snap20220503053224... [2/389] Deleting files for FreeBSD-runtime-dev-14.snap20220503053224: 100% [3/389] Deinstalling FreeBSD-libmagic-dev-14.snap20220503053224... [3/389] Deleting files for FreeBSD-libmagic-dev-14.snap20220503053224: 100% [4/389] Deinstalling FreeBSD-liblzma-dev-14.snap20220503053224... [4/389] Deleting files for FreeBSD-liblzma-dev-14.snap20220503053224: 100% [4/389] Installing FreeBSD-runtime-14.snap20220509053256... [4/389] Extracting FreeBSD-runtime-14.snap20220509053256: 0% pkg: getgrnam_r(wheel): No such file or directory ... So this seems to be a consequence of https://cgit.freebsd.org/src/commit/?id=7ac164dc8e2ec3e6d3cda1d9ca13d461a534a6e8 . In particular, pkg sees that hyperv.conf moved out of FreeBSD-runtime, so to both upgrade FreeBSD-runtime and FreeBSD-hyperv-tools, pkg deleted the former and reinstalled it, so all the etc files that it manages get reset to their defaults. A workaround is to delete FreeBSD-hyperv-tools before upgrading. In this case, it looks simply like a deficiency of the solver. Moving hyperv.conf just means that pkg must upgrade FreeBSD-runtime before FreeBSD-hyperv-tools; it does not need to delete then install FreeBSD-runtime. More generally, pkg/pkgbase really need some mechanism to avoid deleting critical files.
Cherry-picking part of what you wrote, > to ... upgrade FreeBSD-runtime... pkg deleted ... and reinstalled it, so all the etc files that it manages get reset to their defaults. This is caused by FreeBSD-runtime being removed and installed, rather than upgraded? It seems like this is a critical deficiency independent of whether something is done with the solver or not - even if the user does something like using override/force flags to delete critical packages we need to protect these critical files.