Don't process processed packages again in collect_rdeps
Otherwise we will get exponential time complexity
This commit is contained in:
parent
07ec982b07
commit
2c69345acc
@ -107,7 +107,6 @@ collect_rdeps(struct xbps_handle *xhp, xbps_dictionary_t pkgd, bool rpool)
|
|||||||
pd->pkg = curpkgver;
|
pd->pkg = curpkgver;
|
||||||
pd->rdeps = xbps_array_copy(currdeps);
|
pd->rdeps = xbps_array_copy(currdeps);
|
||||||
SLIST_INSERT_HEAD(&pkgdep_list, pd, pkgdep_entries);
|
SLIST_INSERT_HEAD(&pkgdep_list, pd, pkgdep_entries);
|
||||||
}
|
|
||||||
if (xbps_array_count(currdeps)) {
|
if (xbps_array_count(currdeps)) {
|
||||||
int rv;
|
int rv;
|
||||||
|
|
||||||
@ -115,6 +114,7 @@ collect_rdeps(struct xbps_handle *xhp, xbps_dictionary_t pkgd, bool rpool)
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user