diff options
author | Timo Teräs <timo.teras@iki.fi> | 2014-10-06 14:09:50 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-10-06 14:09:50 +0300 |
commit | f911f7043becd562d2adfafcb26e192023b9c73f (patch) | |
tree | b916284c3216a088c642f5eeacd8688ea69bb8d5 /src/index.c | |
parent | ac39e84d53228bccfd4b371ec3ee3350ceca0f28 (diff) | |
download | apk-tools-f911f7043becd562d2adfafcb26e192023b9c73f.tar.gz apk-tools-f911f7043becd562d2adfafcb26e192023b9c73f.tar.bz2 apk-tools-f911f7043becd562d2adfafcb26e192023b9c73f.tar.xz apk-tools-f911f7043becd562d2adfafcb26e192023b9c73f.zip |
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).
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/index.c b/src/index.c index 4a97911..a783095 100644 --- a/src/index.c +++ b/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; |