-
Notifications
You must be signed in to change notification settings - Fork 302
Package upgrade doesn't ensure the base system is installed while processing scripts #2528
Description
As currently generated packages produced by ports have no dependency on package base packages. This has the unfortunate consequence that pkg will uninstall/reinstall packages while most of the base system is currently not present. In the most extreme case not even libc or the runtime loader are present while scripts or triggers attempt to run.
To make matters worse the otherwise idle little Atom board with "only" 4GiB RAM + 2GiB swap ran out of memory while attempting to upgrade FreeBSD-src. I was left with a completely broken system without libc or rtld and had to recover with pkg-static while manually setting OSVERSION and ABI on the command line. I know this is about the worst moment during the upgrade to crash for any reason, but having to recover like this is beyond most users.
IMO pkg shouldn't require >4GiB RAM to upgrade a system with < 1000 packages. It would also be nice to have a meta package with the previously installed packages tucked away somewhere to simplify reconstructing which packages where installed when you can't scroll back far enough or can't copy and and paste.