libpkgconf/queue.c


Log

Author Commit Date CI Message
Ariadne Conill 8b3dd835 2025-03-06T14:25:23 libpkgconf: queue: always evaluate the entire dependency graph when solving Some types of pkgconf queries may look at subsets of the entire DAG, but we must consistently solve for the entire DAG so that each query has a consistent view of the DAG. Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 6f1055d0 2025-02-02T03:06:12 libpkgconf: queue: stop considering the lack of a pre-loaded match in a dependency node as a fatal error This is a performance optimization, not an absolute source of truth. We will evaluate the dependency node lazily in these cases anyway... Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill a79952a0 2025-02-02T02:30:38 libpkgconf: queue: always walk requires.private lists internally This ensures the internal dependency graph solution is always consistent. We filter out the nodes we don't care about in cases where we need to filter as of commit 86602bc, so now we can just simplify the solving a little bit. Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill a6179c77 2024-08-05T13:42:49 queue: add PKGCONF_PKG_DEPF_QUERY to color solution nodes part of the original query
Ariadne Conill 7a8532f8 2024-03-27T18:39:00 queue: remove no longer used root package reference when walking dependency graphs
Kai Pastor 78d53ea0 2024-02-23T15:18:08 Revise serials, traversal, flattening Remove the 'traverse_serial' fields which were added in 2.1.1. Use the 'serial' field to track the current traversal. Stop using 'identifier' to sort packages in the flattened solution. Directly construct the flattened solution by a specific walk which also preserves the relative order in Requires and Requires.private. The topological sort is a single list, so don't fill requires_private. Purely private dependencies are marked in dependency flags. The ancestor flag is a pkg property, not a client property.
Kai Pastor 4090ba3e 2024-02-23T15:18:08 Clarify tracing messages
Kai Pastor 4e01010d 2024-03-16T15:19:57 Mark user input in error message
Ariadne Conill 5fb09af8 2023-11-22T18:43:04 queue: ensure the initial solution is cleaned up when it is no longer needed
Ariadne Conill f3540de3 2023-10-09T07:27:00 queue: clarify the relationship between a flattened dep and its parent Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Kai Pastor be1ea788 2023-10-15T08:32:48 Separate input world from output world
Sam James d454f62c 2023-11-05T22:17:02 libpkgconf: fix -Walloc-size GCC 14 introduces a new -Walloc-size included in -Wextra which gives: ``` libpkgconf/personality.c:260:11: warning: allocation of insufficient size '1' for type 'pkgconf_cross_personality_t' {aka 'struct pkgconf_cross_personality_'} with size '48' [-Walloc-size] libpkgconf/queue.c:46:33: warning: allocation of insufficient size '1' for type 'pkgconf_queue_t' {aka'struct pkgconf_queue_'} with size '16' [-Walloc-size] libpkgconf/client.c:164:33: warning: allocation of insufficient size '1' for type 'pkgconf_client_t' {aka 'struct pkgconf_client_'} with size '120' [-Walloc-size] libpkgconf/path.c:105:14: warning: allocation of insufficient size '1' for type 'pkgconf_path_t' {aka 'struct pkgconf_path_'} with size '24' [-Walloc-size] libpkgconf/path.c:237:22: warning: allocation of insufficient size '1' for type 'pkgconf_path_t' {aka 'struct pkgconf_path_'} with size '24' [-Walloc-size] libpkgconf/tuple.c:239:34: warning: allocation of insufficient size '1' for type 'pkgconf_tuple_t' {aka 'struct pkgconf_tuple_'} with size '24' [-Walloc-size] libpkgconf/dependency.c:133:13: warning: allocation of insufficient size '1' for type 'pkgconf_dependency_t' {aka 'struct pkgconf_dependency_'} with size '44' [-Walloc-size] libpkgconf/dependency.c:472:17: warning: allocation of insufficient size '1' for type 'pkgconf_dependency_t' {aka 'struct pkgconf_dependency_'} with size '44' [-Walloc-size] libpkgconf/fragment.c:146:22: warning: allocation of insufficient size '1' for type 'pkgconf_fragment_t' {aka 'struct pkgconf_fragment_'} with size '24' [-Walloc-size] libpkgconf/fragment.c:195:22: warning: allocation of insufficient size '1' for type 'pkgconf_fragment_t' {aka 'struct pkgconf_fragment_'} with size '24' [-Walloc-size] libpkgconf/fragment.c:356:14: warning: allocation of insufficient size '1' for type 'pkgconf_fragment_t' {aka 'struct pkgconf_fragment_'} with size '24' [-Walloc-size] libpkgconf/pkg.c:422:13: warning: allocation of insufficient size '1' for type 'pkgconf_pkg_t' {aka 'struct pkgconf_pkg_'} with size '188' [-Walloc-size] libpkgconf/client.c:164:33: warning: allocation of insufficient size '1' for type 'pkgconf_client_t' {aka 'struct pkgconf_client_'} with size '224' [-Walloc-size] libpkgconf/personality.c:260:11: warning: allocation of insufficient size '1' for type 'pkgconf_cross_personality_t' {aka 'struct pkgconf_cross_personality_'} with size '96' [-Walloc-size] libpkgconf/dependency.c:133:13: warning: allocation of insufficient size '1' for type 'pkgconf_dependency_t' {aka 'struct pkgconf_dependency_'} with size '80' [-Walloc-size] libpkgconf/dependency.c:472:17: warning: allocation of insufficient size '1' for type 'pkgconf_dependency_t' {aka 'struct pkgconf_dependency_'} with size '80' [-Walloc-size] libpkgconf/path.c:105:14: warning: allocation of insufficient size '1' for type 'pkgconf_path_t' {aka 'struct pkgconf_path_'} with size '48' [-Walloc-size] libpkgconf/path.c:237:22: warning: allocation of insufficient size '1' for type 'pkgconf_path_t' {aka 'struct pkgconf_path_'} with size '48' [-Walloc-size] libpkgconf/queue.c:46:33: warning: allocation of insufficient size '1' for type 'pkgconf_queue_t' {aka 'struct pkgconf_queue_'} with size '32' [-Walloc-size] libpkgconf/tuple.c:239:34: warning: allocation of insufficient size '1' for type 'pkgconf_tuple_t' {aka 'struct pkgconf_tuple_'} with size '48' [-Walloc-size] libpkgconf/fragment.c:146:22: warning: allocation of insufficient size '1' for type 'pkgconf_fragment_t' {aka 'struct pkgconf_fragment_'} with size '48' [-Walloc-size] libpkgconf/fragment.c:195:22: warning: allocation of insufficient size '1' for type 'pkgconf_fragment_t' {aka 'struct pkgconf_fragment_'} with size '48' [-Walloc-size] libpkgconf/fragment.c:356:14: warning: allocation of insufficient size '1' for type 'pkgconf_fragment_t' {aka 'struct pkgconf_fragment_'} with size '48' [-Walloc-size] libpkgconf/pkg.c:422:13: warning: allocation of insufficient size '1' for type 'pkgconf_pkg_t' {aka 'struct pkgconf_pkg_'} with size '360' [-Walloc-size] ``` The calloc prototype is: ``` void *calloc(size_t nmemb, size_t size); ``` So, just swap the number of members and size arguments to match the prototype, as we're initialising 1 struct of size `sizeof(struct ...)`. GCC then sees we're not doing anything wrong. The only exception there is for argv which I fixed while at it. Signed-off-by: Sam James <sam@gentoo.org>
Ariadne Conill 752a9825 2023-10-09T07:22:59 queue: demote requires to requires.private when processing requires.private parents Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Ariadne Conill ee702658 2023-09-02T21:05:03 use PRIu64 format specifiers for some uint64 identifiers in trace logging Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Ariadne Conill 4fb0988a 2023-08-11T14:16:41 libpkgconf: queue: make the pkgconf_queue_t type public Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Ariadne Conill a4eb097b 2023-08-04T08:23:00 queue: process packages in the resolution queue in the correct order
Ariadne Conill 5d0e2f50 2023-08-04T08:19:42 Track packages using a lifetime unique identifier Use that identifier to cancel graph edges rather than the number of hits, which biases the earliest edge rather than the latest.
Ariadne Conill 99bc93fb 2023-01-21T20:45:29 use SIZE_FMT_SPECIFIER everywhere
Ariadne Conill 5044491f 2022-08-16T19:27:35 queue: add function to free a compiled solution
Ariadne Conill 74faf8d0 2022-08-16T18:38:46 queue: do not enqueue unsolved nodes as part of a solution
Ariadne Conill 5b10a85a 2022-08-08T09:08:27 queue: add pkgconf_queue_solve API
Ariadne Conill 79d25f97 2022-08-08T00:58:39 queue: ensure private deps get flattened when --static is requested
Dylan Baker 301d8fa0 2022-08-04T12:22:49 queue: free unused dependencies when flattening
Dylan Baker a46ce367 2022-08-03T16:40:04 queue: when collecting dependents don't iterate private twice Currently, the private field is iterated collecting private deps and normal deps. It should only be iterated when collecting private deps.
Dylan Baker e4d1c8ff 2022-08-03T16:22:14 queue: when flattening do nothing if the flattened deps are empty
Dylan Baker 66090011 2022-08-03T16:08:00 queue: unref dependency in all cases
Dylan Baker e275594b 2022-08-03T15:56:54 queue: ensure cleanup happens when applying
Ariadne Conill fdd7d192 2022-06-26T18:38:55 queue: fix ISO C conformance for fallthrough label
Ariadne Conill a1a41511 2022-06-26T18:09:22 queue: handle pkgconf_pkg_verify_dependency failure while flattening
Ariadne Conill 9bc6d80e 2022-06-26T18:06:04 queue: push new unresolved dependencies to the front of the queue, rather than the tail
Ariadne Conill fe4db3aa 2022-06-26T18:04:42 queue: skip dependency collection for root node
Ariadne Conill 5a82a259 2022-06-26T15:17:08 queue: use maxdepth after flattening
Ariadne Conill a416dc1f 2022-06-26T15:16:36 queue: advance client serial when walking requires.private for flattening
Ariadne Conill 197fcadd 2022-06-26T15:02:37 queue: add flattening code
William Pitcock ad65bc4a 2018-03-18T18:01:59 libpkgconf: dependency: allow dependency nodes to be colored with traits
William Pitcock e0bf4009 2017-12-12T00:21:21 libpkgconf: pkg: rename pkgconf_pkg_t.requires to pkgconf_pkg_t.required (closes #154) C++20 makes requires a keyword, so we need to not use it in headers.
William Pitcock e9fd43ca 2017-09-17T23:38:25 libpkgconf: clean up header includes (closes #137)
William Pitcock 5554be49 2017-01-22T23:28:51 libpkgconf: queue: chase API change (mark static root virtual packages as static)
William Pitcock 7b39c384 2017-01-19T18:17:29 libpkgconf: pkg: clean up use of flags variable (ref #105)
William Pitcock 0ca6a16c 2017-01-19T17:32:38 libpkgconf: queue: nuke flags parameters (ref #105)
William Pitcock 4967c85d 2016-12-10T23:27:21 libpkgconf: document queue module
William Pitcock c05ecdfc 2016-12-02T00:29:33 libpkgconf: migrate cache to pkgconf_client_t which unfortunately requires it to be non-const :(
William Pitcock 8740c5cd 2016-12-01T15:05:03 libpkgconf: begin removing global state from libpkgconf library by introducing a "client" object which holds the state
William Pitcock f44f8399 2016-05-20T02:06:46 queue: namespace the virtual 'world' package as something that could never actually exist
William Pitcock 06a45f1b 2015-09-06T11:45:00 libpkgconf: clean up PKG_ERRF and PKGF_ defines
William Pitcock ec5cc3f0 2015-09-06T11:37:20 libpkgconf: PKG_PROPF namespace becomes PKGCONF_PKG_PROPF.
William Pitcock ca1b0265 2015-09-06T11:20:48 libpkgconf: untangle remaining pkg_ functions related to pkgconf_pkg_t
William Pitcock 4410eb2c 2015-09-06T10:51:34 libpkgconf: pkg_queue becomes pkgconf_queue
William Pitcock 1ee18d0e 2015-09-06T10:38:30 libpkgconf: move pkg_dependency to pkgconf_dependency namespace
William Pitcock cc2dcc1f 2015-09-06T10:31:21 libpkgconf: move pkg_node and pkg_list to pkgconf_node and pkgconf_list namespaces
William Pitcock a706b3dc 2015-09-06T09:35:08 initial libtoolization for libpkgconf