Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
care is needed to get the score right.
|
|
|
|
In case someone did "fix --force" for package for which we have no
APK available, we would uninstall the package instead of silently
ignoring the request. This could mean worse things.
So now we just consider unavailable packages a bad deal for reinstall
requests. And will downgrade if necessary. But if we really don't
have any APK available, we just skip the request but report it.
|
|
If n+1 packages depend A, and A depend on B. Add n+1 dependencies
to B. Otherwise if someone conflicts B, B might be left out.
Leaving package unassigned is no longer a non-preferred action,
this fixes the final test case that was failing.
And with --force we might even install that scenario.
Add also some debug checks.
|
|
callgrind says it's more overhead than improvement. back jumping
effectively prunes all bad trees. but can be added later if it
becomes needed; due to e.g. provides support.
|
|
It is faster to just scan the cache directory for existing packages
at startup than trying to faccessat() them on demand. It also makes
quite a few parts of the code more readable and simpler.
|
|
|
|
|
|
|
|
* properly do absolute scoring now, the previous scoring where
preference could get reduced could have caused incorrect early
pruning of search tree
* backtracking is now separated from package state, and first
branching point is the decision if a name is left unassigned
or if something _has_ to be assigned. this allows multiple future
search tree optimizations like handling of common dependencies
early.
* merge common dependency names early to provide deeper forward
checking.
|
|
|
|
also, discover late if package is needed or not.
|
|
|
|
Instead of "skipping" certain packages, we include them as-if required,
and at expansion time we decide if they actually need to be considered
for installation. This cleans up the expansion main loop a little bit
and makes the code work together better.
|
|
* cleaned up little bit on the internal state machine
* the decision applying mechanism now aborts early to avoid work
if we are approaching bad solution candidate
* package availability checking is now done on-demand; which
could still be improved
|
|
|
|
name state could get overwritten later, so we can't use that when
generating the changeset.
|
|
|
|
* solver internally calculates now using tags; not repository masks
* installeddb now contains the tag name where the package came from
-> we can now handle upgrades properly
* the pinning is still a preference, and not strictly enforced;
versioned dependencies may overrule preference
|
|
Forgot to reset per-name penalty when it got locked by apply_decision.
This also fine tunes compare_package_preference() to always prefer
packages specified on command line speeding up calculation certain
complicated solutions.
|
|
* upgrade needs explicit check so we don't try self-upgrade
(which would print additional messages on screen)
* add can fix problems, so check against the new world
* merge the code in few places
|
|
|
|
Previously we would cache the penalty when evaluating the final
solution, and adding that until we backtrack to first topology
position changing that penalty. However, we can just keep track
of minimum penalty based on name state, and add it. This allows
us to bail out early on bad branches because we know in advance
how things will turn out.
|
|
Previously we would not upgrade just by doing "apk add foo@tag" if
foo was already installed. It required explicit '-u'. This allows
'apk add' to explicitly prefer the newly specified pinning.
|
|
|
|
|
|
|
|
did not properly detect as error if name could not be satisfied
due to being available in tagged repository which is not enabled.
|
|
|
|
otherwise --force does might not work during boot.
|
|
|
|
caused upgrading package X with "apk add path/to/x...apk" where
the package file was not in any repository to not work properly.
|
|
broken in commit bfd53b59d2e62e17 (print: minor cleanup to indented writer).
|
|
Improves /etc/apk/repositories format so you can say:
http://nl.alpinelinux.org/alpine/v2.3/main
@edge http://nl.alpinelinux.org/alpine/edge/main
@testing http://nl.alpinelinux.org/alpine/edge/testing
After which you can pin dependencies to these tags using:
apk add stableapp newapp@edge bleedingapp@testing
Apk will now by default only use the untagged repositories,
but adding a tag to specific dependency:
1. will prefer that tag for the name
2. allowing pulling in dependencies from that tag (though,
it prefers untagged packages to satisfy deps if possible)
fixes #575
|
|
One can now say in dependency "!foo<2" which means, that if foo is
installed, it needs to be >=2, but it's not a required dependency.
|
|
Should now choose packages better if the best available version
is uninstallable for some reason.
|
|
|
|
this prunes the search tree considerably and fixes a speed
regression introduced in an earlier commit.
|
|
We need to refresh all name states after backtracking as options
that were excluding due to topology ordering might have become
available.
|
|
allow per-name solver flags to be inheritable, and use them in
self-upgrade, add -u and the fix applet. this gives more familiar
behaviour for the upgrades.
|
|
namely this fixes apk upgrade without --no-self-upgrade when
the solver is called twice.
|
|
the only bit of information needed in solver commit is the "hard"
topology sorting information for trigger ordering. fixes a bug in
"apk del" which uses the state pointers to do intermediate
calculations between solution solving and commit.
|
|
fixes #738
|
|
|
|
|
|
|
|
|
|
Deduce the world dependencies to remove locally, and same for the
additional messages about packages not deleted.
|