return pool_rel2id(pool, id, evr, flags, 1);
}
-Id pakfire_str2dep(struct pakfire* pakfire, const char* s) {
+Id pakfire_str2dep(struct pakfire* pakfire, const char* dep) {
Id id = ID_NULL;
// Invalid input
- if (!s) {
+ if (!dep) {
errno = EINVAL;
return id;
}
// Ignore empty strings
- if (!*s)
+ if (!*dep)
return id;
+ const char* s = dep;
+
// Consume any leading space
if (isspace(*s))
s++;
id = pakfire_parse_dep(pakfire, &s);
// Return nothing if we could not parse the entire string
- if (id && *s)
+ if (id && *s) {
+ DEBUG(pakfire, "Invalid dependency: %s\n", dep);
id = ID_NULL;
+ }
return id;
}