Fixes #20597 - store the current target version of upgrade
This allows to prevent running one upgrade before finishing another one. It also fixes an issue, where after updating the packages, one would not be able to continue with the current upgrade when something goes wrong.
Related issues
Bug #20597: Don't allow to run against different --target-version if one upgrade is already in progress
Fixes #20597 - store the current target version of upgrade
This allows to prevent running one upgrade before finishing another one.
It also fixes an issue, where after updating the packages, one would not
be able to continue with the current upgrade when something goes wrong.