summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/apk_database.h2
-rw-r--r--src/database.c1
-rw-r--r--src/index.c17
3 files changed, 11 insertions, 9 deletions
diff --git a/src/apk_database.h b/src/apk_database.h
index 74af494..23a2dd6 100644
--- a/src/apk_database.h
+++ b/src/apk_database.h
@@ -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;
diff --git a/src/database.c b/src/database.c
index 3f1b6f6..25b076d 100644
--- a/src/database.c
+++ b/src/database.c
@@ -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;
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;