summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/commit.c3
-rw-r--r--test/provides.repo7
-rw-r--r--test/provides12.test8
3 files changed, 17 insertions, 1 deletions
diff --git a/src/commit.c b/src/commit.c
index 9efae1f..0c0bb34 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -456,7 +456,8 @@ static void print_conflicts(struct print_state *ps, struct apk_package *pkg)
if (d->version == &apk_null_blob &&
p->version == &apk_null_blob)
continue;
- if (once && p->pkg == pkg) {
+ if (once && p->pkg == pkg &&
+ p->version == d->version) {
once = 0;
continue;
}
diff --git a/test/provides.repo b/test/provides.repo
index 8776803..58bd416 100644
--- a/test/provides.repo
+++ b/test/provides.repo
@@ -97,3 +97,10 @@ V:0.1
S:1
I:1
D:conflicted-dep
+
+C:Q1Eyd5AdpAOBJWKMR89ppC66bbbbj=
+P:self-provide
+V:0.1
+S:1
+I:1
+p:self-provide
diff --git a/test/provides12.test b/test/provides12.test
new file mode 100644
index 0000000..1bee4f9
--- /dev/null
+++ b/test/provides12.test
@@ -0,0 +1,8 @@
+@ARGS
+--test-repo provides.repo
+add self-provide
+@EXPECT
+ERROR: unsatisfiable constraints:
+ self-provide-0.1:
+ conflicts: self-provide-0.1[self-provide]
+ satisfies: world[self-provide]