diff --git a/src/commit.c b/src/commit.c index 42280aa..db548c7 100644 --- a/src/commit.c +++ b/src/commit.c @@ -531,6 +531,10 @@ static void analyze_name(struct print_state *ps, struct apk_name *name) snprintf(tmp, sizeof(tmp), "%s (virtual)", name->name); ps->label = tmp; + label_start(ps, "note:"); + apk_print_indented_words(&ps->i, "please select one of the 'provided by' packages explicitly"); + label_end(ps); + label_start(ps, "provided by:"); foreach_array_item(p0, name->providers) p0->pkg->name->state_int++; diff --git a/src/solver.c b/src/solver.c index fc73642..1deaf50 100644 --- a/src/solver.c +++ b/src/solver.c @@ -715,8 +715,8 @@ static void select_package(struct apk_solver_state *ss, struct apk_name *name) if (p->version == &apk_atom_null && p->pkg->name->auto_select_virtual == 0 && p->pkg->name->ss.requirers == 0 && - (p->pkg->provider_priority == 0 && name->providers->num > 1)) { - dbg_printf(" ignore: virtual package without provider_priority with >1 provider\n"); + p->pkg->provider_priority == 0) { + dbg_printf(" ignore: virtual package without provider_priority\n"); continue; } if (compare_providers(ss, p, &chosen) > 0) { diff --git a/test/provides10.test b/test/provides10.test index c832b75..91bf295 100644 --- a/test/provides10.test +++ b/test/provides10.test @@ -5,6 +5,8 @@ add conflicted-dep @EXPECT ERROR: unable to select packages: conflicted-provider (virtual): + note: please select one of the 'provided by' + packages explicitly provided by: conflicted-provider-a conflicted-provider-b required by: conflicted-dep-0.1[conflicted-provider] diff --git a/test/provides11.test b/test/provides11.test index 54c6b34..c48c33c 100644 --- a/test/provides11.test +++ b/test/provides11.test @@ -5,6 +5,8 @@ add conflicted-parent @EXPECT ERROR: unable to select packages: conflicted-provider (virtual): + note: please select one of the 'provided by' + packages explicitly provided by: conflicted-provider-a conflicted-provider-b required by: conflicted-dep-0.1[conflicted-provider] diff --git a/test/provides9.test b/test/provides9.test index ce45a15..8df1bc8 100644 --- a/test/provides9.test +++ b/test/provides9.test @@ -4,6 +4,8 @@ add conflicted-provider @EXPECT ERROR: unable to select packages: conflicted-provider (virtual): + note: please select one of the 'provided by' + packages explicitly provided by: conflicted-provider-a conflicted-provider-b required by: world[conflicted-provider]