That's a first, and if my futile searches are any indicator, a first ever for anyone.
Everything I use in #FreeBSD is installed from ports, not pkg, yet I somehow managed to bork my pkg database so badly that pkg-static keeps randomly removing vital packages like www/firefox and x11/xorg-server while upgrading (and later reinstalling) completely unrelated ports.
#FreeBSD While I slept, portmaster descended thousands of levels deep into a circular dependencies loop: deskutils/zim > devel/xdg-utils > textproc/xmlto > www/w3m > graphics/imlib2 > graphics/libheif > multimedia/ffmpeg > graphics/libcaca > graphics/imlib2 > graphics/libheif > multimedia/ffmpeg.
Make-installing zim and restarting portmaster without zim somehow broke the circular dependency loop, despite nothing being functionally different.
I had to `rm /var/db/pkg/*` and re-bootstrap pkg to stop my installed ports from being randomly uninstalled. I did that a few days ago, and it worked.
Now I have my most needed ports reinstalled (installed anew, according to #FreeBSD), and my system is back to mostly normal again.
But because I wiped out my pkg database, I have a few thousand now-untracked binaries that I need to sort through, finding out the hard way which ports installed them.
@arielmt setting up poudriere is truly not that bad https://l33tsource.com/blog/2017/05/25/Poudriere/ i think i had something running in less than 2h, but you need somewhat beefy hardware with enough ram
@l33tname @arielmt
Bare-metal ports upgrading tools like portupgrade (alternatives appeared later like portmaster, too) usually are not good at handling cases that some ports are merged into different ones. Tracks twice or more for merged origin because currently installed bare-metal environment has multiple origins that were merged.
This would be one of the initial motivation to develop clean-room builders like poudriere.
If you're on any of *-RELEASE{-p*}, you'll love poudriere.
If you're on any of stable/* and keeping your poudriere builder jails in sync with your bare-metal, you'll be annoyed sometimes.
And if you're on main (aka *-CURRENT), and keeping your poudriere builder jails in sync with your bare-metal, you'll hate poudriere.
poudriere wants to rebuild everything (including actually unneeded to do so) when OSVERSION (comes from __FreeBSD_version in /usr/include/sys/param.h) is bumped blindly even on quite minor bumps like 1404500 to 1404501 that is unlikely to happen on *-RELEASE-p*.
And unfortunately, poudriere is not an all-mighty wizard.
For example, if any deleted ports still having dependants (what depending upon deleted ones) with drop-in alternatives in their commit messages but MOVED is NOT updated for it, poudriere ends up with dependency error.
This can happen, for example, when some ports are moved to different, more suitable category and /or port name is somehow changed.
@arielmt we always mv /var/db/pkg{,.bad} so we have the old databaste to compare against
@atax1a I'm an even bigger idiot than that. I just remembered I have /.zfs/snapshot/(most_recent_name)/var/db/pkg/ to compare against.
@arielmt oh, yeah, we love us some snapped shots
And it happened again, same descent, but starting with multimedia/ffmpeg4, a dependency of emulators/vice. This being the third time in as many days portmaster has burned me, #FreeBSD Handbook section 4.5.4.2 is set to permanent distrust.
I need to either find a large enough block of time to shave the poudriere yak, use a ports management tool stupider than portmaster, or babysit a sequence of long-running make commands, to get my software back to last Saturday.