1. Always use amd64 as that architecture is always available.
2. Use the default mirror unless a subscription key is found.
3. Use required ABI pointing to community/business selection.
While here fix an early return in parsing the subscription.
"-u" will no longer install the kernel directly, but the core
has two hooks for it (one main in upgrade script) and one for
manual recovery on reboot (for scripts that expect it to work
with "-u" and reboot). The reason we needed to split is to do
pre-upgrade hooks that decide if an upgrade will be performed
or if we need to cancel because the migration scripts fail.
While here fix the "-e" option printing "Nothing to do." and
adjust the "Reboot now." message printing a bit.
It would seem that in some cases this would fail for the usual reasons,
but then the system would think it was already on e.g. 22.7 when in
reality it refused to install it (completely).
We will just test for log output as exit codes are harder to deal with
from a PHP perspective and this makes it a bit simpler again.
This reverts commit 47cdc8c22f.
This reverts commit 2a0ad828e9.
-z does clash with kernel and base revert, but it's not really meant
to do it since opnsense-update takes both -z and -r into account.
The use cases for sets in opnsense-revert, however, are fringe at
best and we always recommend using opnsense-update instead.
Sets might be subject to future removal from opnsense-revert.
When upgrading to prelease with the development version
after all is done and there are no other updates available
the upgrade will try to loop over packages set only since
it has no reference for its version.
This doesn't solve the update path problem that moves the
packages to newer versions no longer matching the packages
set, but at least we can start trusting it to remember the
last set it used for upgrade to not pull it in again.
This also works for subsequent updates where you would see
the packages again (22.1.r1 to 22.1.r2 minor update), but
when done once it's also silent about it.
We do want to create a version file to avoid silly
update loops which are already prevented when using
the kernel/base sets.
The problem is that a packages set does not have a
version so we need to create one but cannot clobber
the "core" version file since that one comes from a
possibly unrelated update.