This will avoid that the dependency resolution has to deal with
dependencies which should not really exist.
Fixes: #13000
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
switch (priority) {
// Add every dependency that we have received
case LOG_INFO:
+ // Filter out any dependencies that are provided by this package
+ if (ctx->dep == PAKFIRE_PKG_REQUIRES) {
+ r = pakfire_package_matches_dep(ctx->pkg, PAKFIRE_PKG_PROVIDES, buffer);
+ if (r > 0) {
+ ERROR(pakfire,
+ "Skipping dependency that is provided by the package itself: %s\n",
+ buffer);
+ return 0;
+ }
+ }
+
+ // Add dependency
r = pakfire_package_add_dep(ctx->pkg, ctx->dep, buffer);
if (r) {
ERROR(pakfire, "Could not process dependency '%s': %m\n", buffer);