]> git.ipfire.org Git - pakfire.git/commitdiff
package: Fail if we could not add a dependency
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 25 Oct 2024 16:00:17 +0000 (16:00 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 25 Oct 2024 16:00:17 +0000 (16:00 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/package.c

index 93ba9bd8c05c03f333b71c877fabd6edfc19f3a4..c6b62865d93b3069a1d4f80205030deba9ce8e48 100644 (file)
@@ -1373,8 +1373,12 @@ int pakfire_package_add_dep(struct pakfire_package* pkg,
                const enum pakfire_package_key key, const char* dep) {
        // Parse the dependency
        Id id = pakfire_str2dep(pkg->pakfire, dep);
-       if (!id)
+       if (!id) {
+               ERROR(pkg->ctx, "Could not add dependency '%s' to %s\n",
+                       dep, pakfire_package_get_string(pkg, PAKFIRE_PKG_NEVRA));
+
                return -EINVAL;
+       }
 
        return pakfire_package_add_depid(pkg, key, id);
 }