Commit f911f704 authored by Timo Teräs's avatar Timo Teräs

index: fix warning about package names without provider

It's real only if there's a package with actual dependency
(conflicts and install_if dependencies do not count).
parent ac39e84d
......@@ -92,8 +92,8 @@ struct apk_name {
struct apk_provider_array *providers;
struct apk_name_array *rdepends;
struct apk_name_array *rinstall_if;
unsigned is_dependency : 1;
unsigned int foreach_genid;
union {
struct apk_solver_name_state ss;
void *state_ptr;
......
......@@ -498,6 +498,7 @@ static void apk_db_pkg_rdepends(struct apk_database *db, struct apk_package *pkg
foreach_array_item(d, pkg->depends) {
rname = d->name;
rname->is_dependency |= !d->conflict;
foreach_array_item(rd, rname->rdepends)
if (*rd == pkg->name)
goto rdeps_done;
......
......@@ -74,14 +74,15 @@ static int warn_if_no_providers(apk_hash_item item, void *ctx)
struct counts *counts = (struct counts *) ctx;
struct apk_name *name = (struct apk_name *) item;
if (name->providers->num == 0) {
if (++counts->unsatisfied < 10) {
apk_warning("No provider for dependency '%s'",
name->name);
} else if (counts->unsatisfied == 10) {
apk_warning("Too many unsatisfiable dependencies, "
"not reporting the rest.");
}
if (!name->is_dependency) return 0;
if (name->providers->num) return 0;
if (++counts->unsatisfied < 10) {
apk_warning("No provider for dependency '%s'",
name->name);
} else if (counts->unsatisfied == 10) {
apk_warning("Too many unsatisfiable dependencies, "
"not reporting the rest.");
}
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment