Since we might do multiple parsing runs over the feed list files in the
future, ensure that we do not insert the abstract provider package multiple
times into the provided_by vector.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
if (!ab_pkg->pkgs)
ab_pkg->pkgs = pkg_vec_alloc();
- abstract_pkg_vec_insert(ab_pkg->provided_by, ab_pkg);
+ if (!abstract_pkg_vec_contains(ab_pkg->provided_by, ab_pkg))
+ abstract_pkg_vec_insert(ab_pkg->provided_by, ab_pkg);
provides[0] = ab_pkg;
provides[1] = NULL;
provided_abpkg = ensure_abstract_pkg_by_name(item);
- abstract_pkg_vec_insert(provided_abpkg->provided_by, ab_pkg);
+ if (!abstract_pkg_vec_contains(provided_abpkg->provided_by, ab_pkg))
+ abstract_pkg_vec_insert(provided_abpkg->provided_by, ab_pkg);
provides = tmp;
provides[count - 1] = provided_abpkg;