aboutsummaryrefslogtreecommitdiffstats
path: root/src/commit.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2018-11-02 15:34:59 +0200
committerTimo Teräs <timo.teras@iki.fi>2018-11-02 15:40:53 +0200
commit22abda2af479de22cfaf9ff7cea0b92c39bfdaed (patch)
treef3083b1dfb6b30240138699b6daf4a576fc1e8a7 /src/commit.c
parent59271f8c1382efc6b52ac20c862ef7126317d0a8 (diff)
downloadapk-tools-22abda2af479de22cfaf9ff7cea0b92c39bfdaed.tar.bz2
apk-tools-22abda2af479de22cfaf9ff7cea0b92c39bfdaed.tar.xz
inhibit printing same 'required by' dependency multiple times
this would happen if same package matched multiple times due to multiple provided names.
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c5
1 files changed, 5 insertions, 0 deletions
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;