summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2025-04-04 15:25:01 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2025-04-04 15:28:40 +0200
commit295ab44a3063fb7790d8a558a161fc1bd801f998 (patch)
tree61a0d5a9aa559f6acb18712c040ee473c36c9fa3 /doc
parentb279e8b3df2c8620bb3a0f2deb8325a85f4a9a3b (diff)
solver3: Consider more upgrades more costly when not upgrading
We inadvertently considered more upgrades as a better solution in all cases, but if we are *installing* rather than upgrading, we should count upgrades as a negative. Change the code to accomodate that. This requires a few more tricks: - We remove the keep count check. This does not appear to work correctly and would have prevented the fix. We are already counting all possible changes, so why bother. - We need to subtract the upgrade count from the install count (upgrades are a class of installs) since we now allow comparing solutions with different upgrade counts for install counts. - After comparing the "new install count", we now compare upgrade count too, in the opposite direction of upgrading. To test, we abuse that solver 3.0 does not upgrade all packages in a source package when using the install command. LP: #2105395
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions