mirror of
https://github.com/pkgconf/pkgconf.git
synced 2026-01-26 16:09:27 +00:00
libpkgconf: pkg: track conflict rule origins
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
This commit is contained in:
parent
5e26791ba5
commit
07dfbfffee
@ -211,6 +211,9 @@ pkgconf_dependency_free_one(pkgconf_dependency_t *dep)
|
||||
if (dep->version != NULL)
|
||||
free(dep->version);
|
||||
|
||||
if (dep->why != NULL)
|
||||
free(dep->why);
|
||||
|
||||
free(dep);
|
||||
}
|
||||
|
||||
|
||||
@ -102,6 +102,8 @@ struct pkgconf_dependency_ {
|
||||
|
||||
int refcount;
|
||||
pkgconf_client_t *owner;
|
||||
|
||||
char *why;
|
||||
};
|
||||
|
||||
struct pkgconf_tuple_ {
|
||||
|
||||
@ -1647,7 +1647,7 @@ pkgconf_pkg_walk_conflicts_list(pkgconf_client_t *client,
|
||||
if (eflags == PKGCONF_PKG_ERRF_OK)
|
||||
{
|
||||
pkgconf_error(client, "Version '%s' of '%s' conflicts with '%s' due to satisfying conflict rule '%s %s%s%s'.\n",
|
||||
pkgdep->version, pkgdep->realname, root->realname, parentnode->package, pkgconf_pkg_get_comparator(parentnode),
|
||||
pkgdep->version, pkgdep->id, parentnode->why, parentnode->package, pkgconf_pkg_get_comparator(parentnode),
|
||||
parentnode->version != NULL ? " " : "", parentnode->version != NULL ? parentnode->version : "");
|
||||
|
||||
if (!(client->flags & PKGCONF_PKG_PKGF_SIMPLIFY_ERRORS))
|
||||
|
||||
@ -277,6 +277,7 @@ pkgconf_queue_collect_conflicts(pkgconf_client_t *client,
|
||||
pkgconf_dependency_t *conflict = cnode->data;
|
||||
pkgconf_dependency_t *flattened_conflict = pkgconf_dependency_copy(client, conflict);
|
||||
|
||||
flattened_conflict->why = strdup(pkg->id);
|
||||
pkgconf_node_insert(&flattened_conflict->iter, flattened_conflict, &world->conflicts);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user