Commit 462bb3b8 authored by Timo Teräs's avatar Timo Teräs

solver: if pinning is specified, it overrides preferred repos

add also a test case for this
parent 0fe8507f
......@@ -256,7 +256,7 @@ static void inherit_pinning(struct apk_solver_state *ss, struct apk_package *pkg
pkg->ss.pinning_allowed |= pinning;
pkg->ss.tag_ok |= !!(repos & repo_mask);
if (prefer) {
pkg->ss.pinning_preferred |= pinning;
pkg->ss.pinning_preferred = pinning;
pkg->ss.tag_preferred = !!(repos & apk_db_get_pinning_mask_repos(ss->db, pkg->ss.pinning_preferred));
}
}
......
......@@ -18,3 +18,9 @@ S:1
I:1
D:a>=2
C:Q1eVpkasfqZAukArrYbg324xt4WUX=
P:samever
V:10
S:1
I:1
......@@ -18,3 +18,9 @@ S:1
I:1
D:a>=3
C:Q1eVpkasfqZAukArrYbg324xt4WUr=
P:samever
V:10
S:1
I:1
@ARGS
--test-repo pinning-basic.repo
--test-repo testing:pinning-overlay1.repo
add samever@testing
@EXPECT
(1/1) Installing samever@testing (10)
OK: 0 MiB in 0 packages
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment