Timo Teräs
ac0c7457c2
errors: detect self-conflicts properly
...
and add the provided version information to the conflicts.
fixes the final test case that was broken. hooray.
2013-06-14 21:37:38 +03:00
Timo Teräs
56b623b9e2
solver: use array_foreach_item and clean ups
2013-06-14 21:24:33 +03:00
Timo Teräs
edf03b155b
audit, index, search, upgrade: use foreach_array_item
2013-06-14 20:26:48 +03:00
Timo Teräs
59d15ab259
solver, errors: fix few additional test cases and clean ups
2013-06-13 21:59:08 +03:00
Timo Teräs
2ff59b7c23
search: speed up searching exact package names
2013-06-13 21:19:30 +03:00
Timo Teräs
f4ce2bf4c4
search: fix reverse dependency searching ( fixes #2084 )
...
use the new apk_pkg_foreach_reverse_dependency helper to find
the reverse dependencies properly.
2013-06-13 21:12:40 +03:00
Timo Teräs
bcda66bf08
pkg: add global reverse dependency iterator helpers and use them
...
... in the error printing and the package deletion.
2013-06-13 20:48:38 +03:00
Timo Teräs
e51232e710
errors: rewrite the logic how errors are reported
...
Instead of the dependency oriented logic, switch to print them
for each package or name needed. Might give a bit more readable
errors now. There's still few corner cases that proper error is
not output, which are cought by the test cases.
2013-06-13 18:22:00 +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
Natanael Copa
f292a85867
lua: support for lua 5.2
2013-06-13 14:21:01 +00: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
William Pitcock
78ee4267cd
libapk, apk(8): fix header inclusion issues with musl's headers
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
129821d274
apk-tools-2.3.5
2013-06-03 16:53:33 +03:00
Timo Teräs
447b194b26
index: add sensible error message if metadata is too long
...
fixes #1476
Instead of:
ERROR: Index generation failed: Success
The following is now printed:
ERROR: Metadata for package timo-1.0-r0 is too long.
ERROR: Index generation failed: No buffer space available
2013-05-30 10:22:35 +03:00
Timo Teräs
aec93ee730
db: unify handling of special packages
...
make cache a special kind of repository, and automatically cache
special packages (virtual packages, or ones installed from command
line). add test cases for handling virtual packages. fixes #1617 .
2013-05-30 08:48:32 +03:00
Timo Teräs
035da87036
db, info: allow packages to install files/symlinks to root
...
fixes #1578
2013-05-29 14:37:42 +03:00
Timo Teräs
6a761c72e2
db: make dev/null a character device with --initdb
...
fixes #1714
2013-05-29 13:44:42 +03: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
4c08eca3bb
upgrade: handle solver failure gracefully
...
It is internal bug, but don't segfault on it. Fixes #1576 .
2013-04-29 14:14:57 +03:00
Pierre Carrier
4d95266e4d
apk_hash.h: include stddef.h
...
Needed for ptrdiff_t in some libcs.
2013-04-18 06:19:45 +00:00
Pierre Carrier
61b4c443c9
*.c: malloc.h->stdlib.h
2013-04-18 06:19:33 +00: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
528156a9fa
solver: do not backtrack over "exclude none"
...
Otherwise we can return no solution at all instead of partially
satisfied solution (and give proper error message).
2013-01-22 16:23:16 +02:00
Timo Teräs
93bd305713
solver: simplify strength evaluation in constraint handling
2013-01-21 15:37:23 +02:00
Timo Teräs
235342ea0b
apk-tools-2.3.4
2013-01-21 10:56:09 +02:00
Timo Teräs
2a194f3e7b
solver: check if solution is not found at all
...
This is an internal error.
2013-01-21 09:12:44 +02:00
Timo Teräs
b960759daa
solver: fix reset of last_touched to zero
2013-01-18 16:21:38 +02:00
Timo Teräs
cb15b31b79
solver: some code clean ups
2013-01-18 16:20:55 +02:00
Natanael Copa
3c40070752
solver: build fix for debug print on x86_64
...
use %zu for size_t
2013-01-18 14:46:25 +01:00
Timo Teräs
86a7338575
solver: fix name assignment logic to not mess up internal state
...
Should get rid of error messages like:
ERROR: Saved_score {4/0/0,74} != score {6/0/0,74}
2013-01-18 11:38:31 +02:00
Timo Teräs
e50da7e4a5
ver: fix help message of --limit
2012-11-05 13:59:10 +02:00
Timo Teräs
832dfed637
solver: fix package prefence calculation a bit
2012-11-04 12:13:19 +02:00
Timo Teräs
21d391961b
apk-tools-2.3.3
2012-10-09 16:50:31 +03:00
Timo Teräs
60f9a03174
del: consider also reverse dependencies for provided names
...
So we get better error report if package is not deleted due to
reverse dependency.
2012-10-09 13:09:56 +03:00
Timo Teräs
1e18b48c58
test: fix conflict2 expectation after solver changes
...
The 'a' package is now more preferred which actually makes more
sense.
2012-10-09 11:09:07 +03: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
01d0e4c408
solver: optimize backjumping
...
to be functional when backtracking
2012-10-08 12:25:43 +03:00
Timo Teräs
831bce5cf9
solver: properly calculate decision "strength" with provides
2012-10-08 11:50:52 +03:00
Timo Teräs
dec409c6d4
solver: fix back jumping once more
2012-10-05 17:26:53 +03:00
Timo Teräs
bc7e8f5da8
solver: record dependency apk_name in apk_decision
...
We can't just use the primary name, as that would mess up
backtracking. We need to record the name which caused the name
to get considered - that way the right last_touched_decision is
used on backtracking.
2012-10-05 15:48:12 +03:00
Timo Teräs
4dd8c58df9
solver: various fixes
...
* push_decision expects to always get the package primary 'name'
as apk_name. ASSERT that and fix problem cases.
(though - this might need to be reverted, and store the non
primary name in apk_decision instead to accomodate for better
backtracking optimizations)
* fix error reporting of virtual package names
* make 'assign_name' errors soft. the incorrect packages just are
no longer consider instead of aborting whole calculation.
* fix backtracking of virtual packages that are not depended
directly
2012-10-03 15:07:31 +03:00
Natanael Copa
081155c438
solver: improve assert error messages
...
Print name of package and void double "ERROR"
2012-10-03 09:16:28 +02:00
Natanael Copa
00958d9207
solver: fix compile with -Werror on 64bit
2012-10-03 09:04:35 +02:00
Natanael Copa
4b7b5d4668
info: --provides alias -p is reserved for --root, use -P
...
fixes #1396
2012-09-28 10:25:30 +03:00