From 0a17a648db0e9df61f9bea9d5be292a98106dc6a Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Thu, 2 Nov 2017 16:31:50 +0000 Subject: solver: only select a default if there is at least one provider with a declared provider_priority --- src/solver.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/solver.c b/src/solver.c index 17dbdd2..c7c9983 100644 --- a/src/solver.c +++ b/src/solver.c @@ -668,6 +668,12 @@ static void select_package(struct apk_solver_state *ss, struct apk_name *name) (!p->pkg->ss.iif_triggered || !p->pkg->ss.tag_ok)) continue; + /* Virtual packages without provider_priority cannot be autoselected */ + if (p->version == &apk_null_blob && + p->pkg->name->auto_select_virtual == 0 && + p->pkg->name->ss.requirers == 0 && + p->pkg->provider_priority == 0) + continue; if (compare_providers(ss, p, &chosen) > 0) chosen = *p; } -- cgit v1.2.3-70-g09d2