Timo Teräs
0a13141889
print: move progress printing to common functions
2013-06-17 16:47:49 +03:00
Timo Teräs
92764088a2
db, cache: do not use cache/tmp for downloads
...
instead use prefix for temporary files.
2013-06-17 16:33:59 +03:00
Timo Teräs
557d360c7f
url: remove unused apk_url_download
2013-06-17 14:40:50 +03:00
Timo Teräs
9d10037807
db: refactor repository file construction
...
Fixes also 'fetch' applet to prefer copying/linking to files from
cache if possible.
2013-06-17 14:38:27 +03:00
Timo Teräs
dbb642206d
io: fix splice for copying unknown lengths
2013-06-17 14:23:14 +03:00
Timo Teräs
f79e3946a4
pkg: apk_pkg_foreach_* add matching generation
...
So same package it is possible to not match same package multiple
times. Use generation count, so this is handled cleanly during
recursion, like in the use case of search applet.
2013-06-15 22:25:23 +03:00
Timo Teräs
5b02400b26
lua: use apk_dep_analyze
...
and remove the now unused apk_dep_is_materialized_or_provided
which was superceded by apk_dep_analyze.
2013-06-15 19:48:30 +03:00
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