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).cute-signatures
parent
ac39e84d53
commit
f911f7043b
|
@ -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;
|
||||
|
|
17
src/index.c
17
src/index.c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue