Commit Graph

23 Commits (cute-signatures)

Author SHA1 Message Date
TBK 5d796b5678 use SPDX-License-Identifier in source files 2020-05-07 10:45:42 +03:00
nrybowski 695a2f8231 upgrade: implement --ignore to exclude some packages from upgrade 2019-12-12 13:47:11 +02:00
William Pitcock 9165aa3894 solver: instead of tracking selected packages, score by requirer count for tiebreaking 2017-11-02 16:24:09 +00:00
William Pitcock f18c708183 solver: implement support for choosing default virtuals
By introducing a new package metadata field, `provider_priority`
(index letter `k`), we can specify default packages to satisfy a
virtual.

If a user wishes to select an alternative provider for the virtual,
a changeset swapping the default provider for the selected provider
will be generated by the dependency resolver.
2017-11-02 03:08:24 +00:00
Timo Teräs e03716ff3b solver: consider virtual provides to exclude non-provides transitively
this fixes package selection when a 'real' package exists, but would
need to be provided by another package with 'virtual provides'.

In current package database this can happen with postgresql which is
also provided by postgresql-bdr. Normally postgresql would be satisfied
by postgresql, but if any package depends on postgresql-bdr and there's
no versioned dependency on postgresql this will help apk figure out
that postgresql-bdr should be used.
2017-10-27 15:20:03 +03:00
Timo Teräs 065715a377 solver: additional improvements to install_if handling 2014-03-12 13:10:19 +02:00
Timo Teräs 3f27da2ade solver: fix pinning+cache to work
Mistakenly allowed masked out package to be installed if it was
in cache.
2013-06-20 14:08:16 +03:00
Timo Teräs 17145f82ae solver: fix package deletion to consier provides properly 2013-06-19 21:39:01 +03:00
Timo Teräs e4c65886dd solver: properly order deletion of unneeded packages 2013-06-19 20:46:53 +03:00
Timo Teräs a984fd3679 solver: add logic: transitive provides exclusion
If name N is required, and all providers of A also provide B, it
means that only instances of B can be selected that provide N. This
is strong help with cases when so:libfoo.so.1 is updated to
so:libfoo.so.2 and not everything is recompiled.
2013-06-19 13:15:53 +03:00
Timo Teräs d315c9019c upgrade: new option: --latest (-l)
Select latest version of package (if it is not pinned), and print
error if it cannot be installed due to other dependencies.

Together with --available, it selects the latest package which is
present at least in some repository.

This also fixes few solver issues with ordering of package selection
that got quite apparent with this flag. Namely, we cannot "lock"
a package until it's reverse dependencies are locked or not all of
the solver flags are propagated properly.
2013-06-19 08:33:51 +03:00
Timo Teräs 25ff68a87e solver: prune broken world dependencies with --force
mostly useful for reboot, when all packages are not available.
2013-06-13 18:22:00 +03:00
Timo Teräs 59678309ea solver: corner case fixes
- try harder to not change anything during self-upgrade
- also honor locking to packages that where earlier used in
  merging common dependencies
- clarify upgrade applet help messages
2013-06-13 18:22:00 +03:00
Timo Teräs e7fd4d03bf solver: rewrite as deductive solver -- pinning support
Fix also pinning test cases to be more sane.
2013-06-13 18:22:00 +03:00
Timo Teräs 426a12686e solver: rewrite as deductive solver -- per name flags
Handle properly per-name preference flags, and add test cases
for testing those via fix applet.
2013-06-13 18:22:00 +03:00
Timo Teräs b8c44536ca solver: rewrite as deductive solver -- core features
Implementing basic dependency handling, install_if and awareness
of pinning.
2013-06-13 18:22:00 +03:00
William Pitcock 860aa642f0 Revert "Revert "solver: increase score fields to 32-bits (from 16-bits)""
This reverts commit a2d873a77c.
2013-06-12 10:47:11 -05:00
root a2d873a77c Revert "solver: increase score fields to 32-bits (from 16-bits)"
This reverts commit 84bfef1a6b.
2013-06-11 10:30:31 -05:00
Timo Teräs 84bfef1a6b solver: increase score fields to 32-bits (from 16-bits)
We are having so many packages that they might overflow otherwise.
"ERROR: Preference overflow" was already reported.
2013-04-29 14:14:57 +03:00
Timo Teräs 72cd34cf81 solver: remove backjumping by name
It is incorrect optimization causing valid solutions to be skipped.
Any performance it might've gained, should be fixed by reintroduction
of the minimum penalty logic added in previous commit.
2013-01-28 15:34:09 +02:00
Timo Teräs cb98b55b7e solver: reintroduce minimum penalty logic
Basic per-name per-package specific scoring added.
2013-01-28 15:31:34 +02:00
Timo Teräs 16b70566bf solver: additional backjumping scheme
Enabled when all attempts to satisfy a name failed, we know that we
can ignore all decisions until we find a decision affecting the name
we wanted to satisfy.
2012-10-08 15:22:06 +03:00
Timo Teräs 2f66295fc7 solver: merge apk_name_state to apk_name
apk_name_state is now quite small; and we avoid overhead of two
pointers (+ malloc overhead) when we just make it part of apk_name.
It also fixes some problems (that got introduced) where apk_name_state
was not allocated.
2012-02-29 11:26:12 +02:00