summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/solver.c2
-rw-r--r--test/pinning-basic.repo6
-rw-r--r--test/pinning-overlay1.repo6
-rw-r--r--test/pinning13.test7
4 files changed, 20 insertions, 1 deletions
diff --git a/src/solver.c b/src/solver.c
index 5383d0b..c62b7cc 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -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));
}
}
diff --git a/test/pinning-basic.repo b/test/pinning-basic.repo
index 23a8c65..c511f8a 100644
--- a/test/pinning-basic.repo
+++ b/test/pinning-basic.repo
@@ -18,3 +18,9 @@ S:1
I:1
D:a>=2
+C:Q1eVpkasfqZAukArrYbg324xt4WUX=
+P:samever
+V:10
+S:1
+I:1
+
diff --git a/test/pinning-overlay1.repo b/test/pinning-overlay1.repo
index c41ddf7..95a7551 100644
--- a/test/pinning-overlay1.repo
+++ b/test/pinning-overlay1.repo
@@ -18,3 +18,9 @@ S:1
I:1
D:a>=3
+C:Q1eVpkasfqZAukArrYbg324xt4WUr=
+P:samever
+V:10
+S:1
+I:1
+
diff --git a/test/pinning13.test b/test/pinning13.test
new file mode 100644
index 0000000..54ecba3
--- /dev/null
+++ b/test/pinning13.test
@@ -0,0 +1,7 @@
+@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