Commit Graph

13 Commits (1f9a36de6828b87ba9d7dedcae2de6092eed4f41)

Author SHA1 Message Date
Timo Teräs 500f8d4a7d solver, db: implement repository pinning
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
2011-10-29 05:18:21 +03:00
Timo Teräs e682e6596c solver, pkg: implement versioned conflicts
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.
2011-10-24 10:16:40 -04:00
Timo Teräs afd854a3e2 solver: preference scoring
Should now choose packages better if the best available version
is uninstallable for some reason.
2011-10-14 21:01:43 +03:00
Timo Teräs 0e24207c2e solver: report 'complete' solutions with errors
Allow to select packages that conflict in case we are looking for
errors. This allows 'add --force' to install (on boot) the set of
packages with minimum conflicts.
2011-09-05 11:04:00 +03:00
Timo Teräs 1fb1afc5c2 solver: reintroduce install_if support
* each package name has two sorting positions, one which causes
   install_if triggers to be run, and other for bulk dependencies
 * fix also inverted ordering of package installations
2011-08-18 13:08:27 +03:00
Timo Teräs a5146f1b6c solver: generate proper error messages
* the solver no longer does look-ahead locking of names
   (could be possibly optimized later); instead names are now
   always ordered strictly to properly detect the package names
   which are unsolveable
 * basic error tests added, so we can see the most likely problem
   in dependencies easily
2011-08-01 16:21:47 +03:00
Timo Teräs 1a04425fad solver: don't consider package that we can't have
Packages that need (re-)installation but which are not available,
are excluded now properly.
2011-07-27 22:10:44 +03:00
Timo Teräs ad45a6de17 solver: permutate each preferred solution first
The first found solution is the most preferred one then.
2011-07-27 20:45:38 +03:00
Timo Teräs 79b53d4d76 solver: new package selection logic (which is not yet used)
* basic code for a backtracking, forward checking dependency satisfier
 * works better when there are tricky dependencies to solve
   (when can't just upgrade everything to most preferred versions)
 * the new code always evaluates all of 'world' constraints
   (old code just does incremental updates based on heuristics)
 * is probably somewhat slower than old code (probably unnoticeable
   difference in most cases)
 * makes easier to write support for provides and repository pinning
 * test applet and a bunch of test cases added which uses the new code
 * from the old feature set install_if is not yet implemented
2011-07-26 17:08:43 +03:00
Natanael Copa ac3d149cdd test: check if upgrade works when package is missing in repo 2010-06-15 19:18:36 +00:00
Natanael Copa 92533beae0 test: dont run sh manually but respect #!/bin/sh in each test
That way we can set sh options case by case
2010-06-15 15:53:32 +00:00
Natanael Copa 83d859286d test: initial testsuite 2010-06-15 13:31:20 +00:00
Timo Teras 48930b9fe0 test: add test cases for version comparing
so i don't get to break version compares again.
2009-11-06 13:20:30 +02:00