Skip to content

fix(apk-tools): properly recognise packages being replaced during upgrades

Rasmus Thomsen requested to merge ci into master

Previously we would only consider packages in list_upgradable_packages whose change in the upgrade changeset had a new_pkg and old_pkg. However, this assumption doesn't hold true for packages which are replaced via replaces&provides. For the pending-removal packages only old_pkg is set and for the pending-install package only new_pkg is set. As such, also consider this and replace the is_installed member of ApkPackage{,Owned} with a package_state member that better captures the different states a package can be in.

Merge request reports