From: Michael Tremer Date: Fri, 25 Oct 2024 16:00:17 +0000 (+0000) Subject: package: Fail if we could not add a dependency X-Git-Tag: 0.9.30~873 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e6ef595bd7545d0749285e38c44dc89474b6eff4;p=pakfire.git package: Fail if we could not add a dependency Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/package.c b/src/libpakfire/package.c index 93ba9bd8c..c6b62865d 100644 --- a/src/libpakfire/package.c +++ b/src/libpakfire/package.c @@ -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); }