Not 100% sure, but legacy upgrading tools like portupgrade creates package of currently installed version, deinstall current version and install updated version AFTER successful builds. If install phase failed, portupgrade cleans up the updated version and reinstall deleted previous version from backup.
At the beginning, if I recall correctly, creating backup packages was done using stored pkg-plist in its database. Maybe currently using pkg create
instead? So would be deinstall and install.
And if I recall correctly, forcibly upgrading single ports didn't force upgrading of dependencies, unless any of the *_DEPENDS forces new version.
If my understanding is correct, pkg create
to backup currently installed version, pkg delete -f
to forcibly deinstall currently installed version and pkg install
to install new version would what is wanted?