From 22abda2af479de22cfaf9ff7cea0b92c39bfdaed Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Fri, 2 Nov 2018 15:34:59 +0200 Subject: inhibit printing same 'required by' dependency multiple times this would happen if same package matched multiple times due to multiple provided names. --- src/commit.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/commit.c') diff --git a/src/commit.c b/src/commit.c index ac6d7a5..9c32b63 100644 --- a/src/commit.c +++ b/src/commit.c @@ -520,6 +520,7 @@ static void analyze_name(struct print_state *ps, struct apk_name *name) struct apk_provider *p0; struct apk_dependency *d0; char tmp[256]; + unsigned int genid; int refs; if (name->providers->num) { @@ -555,11 +556,15 @@ static void analyze_name(struct print_state *ps, struct apk_name *name) apk_print_indented_fmt(&ps->i, "world[%s]", apk_dep_snprintf(tmp, sizeof(tmp), d0)); } + genid = apk_foreach_genid(); foreach_array_item(pname0, name->rdepends) { name0 = *pname0; foreach_array_item(p0, name0->providers) { if (!p0->pkg->marked) continue; + if (p0->pkg->foreach_genid == genid) + continue; + p0->pkg->foreach_genid = genid; foreach_array_item(d0, p0->pkg->depends) { if (d0->name != name || d0->conflict) continue; -- cgit v1.2.3-70-g09d2