diff options
author | William Pitcock <nenolod@dereferenced.org> | 2017-11-02 16:31:50 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-11-02 16:31:50 +0000 |
commit | 0a17a648db0e9df61f9bea9d5be292a98106dc6a (patch) | |
tree | 5c4157992b50e70a16644094d2aa42c7dd9ecb93 /src | |
parent | 9165aa3894bcf19f36be16d733f75eb997becd4f (diff) | |
download | apk-tools-0a17a648db0e9df61f9bea9d5be292a98106dc6a.tar.gz apk-tools-0a17a648db0e9df61f9bea9d5be292a98106dc6a.tar.bz2 apk-tools-0a17a648db0e9df61f9bea9d5be292a98106dc6a.tar.xz apk-tools-0a17a648db0e9df61f9bea9d5be292a98106dc6a.zip |
solver: only select a default if there is at least one provider with a declared provider_priority
Diffstat (limited to 'src')
-rw-r--r-- | src/solver.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |