Ariadne Conill
74faf8d0e2
queue: do not enqueue unsolved nodes as part of a solution
2022-08-16 18:38:46 +00:00
Ariadne Conill
696124b608
pkg: add support for parsing the URL from pc files
2022-08-12 12:36:21 +00:00
Ariadne Conill
aa99ddf789
pkg: add Copyright and Maintainer fields
...
These are helpful pieces of information for BOM documents
generated by pkgconf.
2022-08-11 15:52:33 +00:00
Ariadne Conill
28b5d57b98
pkg: free SPDX license tags when a package is destroyed
2022-08-08 10:25:24 +00:00
Ariadne Conill
69a3d458ef
libpkgconf: revise API revision to 10902
2022-08-08 09:59:50 +00:00
Ariadne Conill
7e9aa7e1fc
pkg: do not break cycles across dependency lists
2022-08-08 09:56:28 +00:00
Ariadne Conill
69f630aadc
pkg: only advance serial if we are actually traversing from a root
2022-08-08 09:34:45 +00:00
Ariadne Conill
5b10a85a82
queue: add pkgconf_queue_solve API
2022-08-08 09:08:27 +00:00
Ariadne Conill
79d25f979d
queue: ensure private deps get flattened when --static is requested
2022-08-08 00:58:55 +00:00
Dylan Baker
7976daab9a
bsdstubs: include errno.h
...
Needed for ENOMEM, and fixes the build on MacOS.
2022-08-06 22:30:25 -07:00
Ariadne Conill
d8d669f637
pkgconf 1.9.0.
2022-08-07 04:47:04 +00:00
Ariadne Conill
0e05308f9c
pkg: add SPDX license assertion to pkgconf builtin
2022-08-07 04:35:29 +00:00
Ariadne Conill
1389aa05ba
pkg: add pkgconf_pkg_t.license field
...
The pkgconf_pkg_t.license field maps to the new License keyword, and
should be an SPDX license expression.
2022-08-07 04:21:22 +00:00
Ariadne Conill
7edfdbff0b
pkg: upgrade circular reference trace to a warning
2022-08-07 01:29:21 +00:00
Ariadne Conill
662668d082
pkg: add trace log when breaking a circular reference
2022-08-07 01:09:07 +00:00
Dylan Baker
1cfa2d1e20
pkg: prevent circular ownership
...
Otherwise in a case where A references B, and B references A, A and B
will have mutual ownership of each other and prevent each other from
being free'd.
2022-08-04 15:52:10 -07:00
Dylan Baker
301d8fa0c6
queue: free unused dependencies when flattening
2022-08-04 15:52:10 -07:00
Dylan Baker
34b110200a
dependency: zero list after freeing
2022-08-04 15:52:10 -07:00
Dylan Baker
e71a5a3370
dependency: add debug information for dependency refcounting
2022-08-04 15:52:10 -07:00
Dylan Baker
4934205737
pkg: add name of pkg being refed/unrefed to debug outpu
2022-08-04 15:52:10 -07:00
Dylan Baker
a46ce3672f
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.
2022-08-04 15:52:10 -07:00
Dylan Baker
a391f9b650
pkg: use goto cleanup idiom
2022-08-04 15:52:10 -07:00
Dylan Baker
171738024e
cache: clear the cache with pkgconf_cache_remove
...
Which results in more code re-use.
2022-08-04 15:52:10 -07:00
Dylan Baker
e4d1c8ffa5
queue: when flattening do nothing if the flattened deps are empty
2022-08-04 15:52:10 -07:00
Dylan Baker
6609001114
queue: unref dependency in all cases
2022-08-04 15:52:10 -07:00
Dylan Baker
e275594ba6
queue: ensure cleanup happens when applying
2022-08-04 15:52:10 -07:00
Dylan Baker
4a1119aa2a
dependency: Fix reference counting of dependency_addraw
...
We only want a reference to be added for the value inserted into the
list, not the one returned. The returned one is unowned until it reaches
the public dependency_add function, which returns an owned pointer
instead. This makes things semantically more correct.
Unfortunately, this means in a few cases we have to write some ugly
code like:
```c
pkgconf_dependency_t *dep = pkgcond_dependency_add("args");
pkgconf_dependency_unref(dep->owner, dep);
```
2022-08-04 15:52:10 -07:00
Dylan Baker
a4de6235c2
cache: when removing a package from the cache unset the cached flag
2022-08-04 15:52:10 -07:00
Dylan Baker
ebe74fd253
cache: free the cache table when it is empty and set to NULL
...
We do the latter for the benefit of libpkgconf. This cleans up a
significant number of memory leaks in the cache handling.
2022-08-04 15:52:10 -07:00
Dylan Baker
96c61cbab0
libpkgconf: remove trailing ; from macro definition
...
GCC has a lovely bug (which I will report as soon as I have an account),
which causes -Wmisleading-indentation to miss cases of misleading
indentation after a `;;`, since the macro adds `;`, and in call cases
the caller also adds `;`, we end up with a double macro and gcc fails to
warn.
2022-08-03 12:03:15 -07:00
Ariadne Conill
6c70781aad
introduce PKG_CONFIG_PKGCONF1_SYSROOT_RULES for legacy pkgconf behavior
2022-07-26 18:00:22 +00:00
Ariadne Conill
f8aefea7ec
pkg: add flags argument to pkgconf_pkg_new_from_file
2022-07-26 17:13:15 +00:00
Ariadne Conill
297e18f2c8
tuple: add flags parameter to pkgconf_tuple_parse
2022-07-26 17:08:48 +00:00
Ariadne Conill
b0802cb3d1
Revert "pkgconf_pkg_parser_value_set(): fix code-path ordering bug."
...
This reverts commit 13fe4c8c58
.
2022-06-26 19:41:31 +00:00
Ariadne Conill
72e429ae70
tuple: use ${pc_sysrootdir} instead of client->sysroot_dir where relevant
2022-06-26 19:35:19 +00:00
Ariadne Conill
a61193c723
pkg: fix sysroot_dir logic for github 213
2022-06-26 19:16:00 +00:00
Ariadne Conill
d68a867dc0
tuple: fall back to using globals rather than preferring them
2022-06-26 19:15:07 +00:00
Ariadne Conill
fdd7d192e0
queue: fix ISO C conformance for fallthrough label
2022-06-26 18:39:00 +00:00
Ariadne Conill
a1a415111f
queue: handle pkgconf_pkg_verify_dependency failure while flattening
2022-06-26 18:09:22 +00:00
Ariadne Conill
9bc6d80e61
queue: push new unresolved dependencies to the front of the queue, rather than the tail
2022-06-26 18:06:04 +00:00
Ariadne Conill
fe4db3aad9
queue: skip dependency collection for root node
2022-06-26 18:04:42 +00:00
Ariadne Conill
5a82a259ac
queue: use maxdepth after flattening
2022-06-26 15:17:08 +00:00
Ariadne Conill
a416dc1fd6
queue: advance client serial when walking requires.private for flattening
2022-06-26 15:16:36 +00:00
Ariadne Conill
197fcadd4c
queue: add flattening code
2022-06-26 15:02:37 +00:00
Ariadne Conill
5817e8848f
pkg: track the number of hits a package has gotten while solving for dependencies
2022-06-26 07:22:56 +00:00
Ariadne Conill
6ae17bd0ef
pkg: split pkgconf_pkg_traverse into a serial-modifying version
2022-06-26 06:05:40 +00:00
Ariadne Conill
ffa0805d58
cache: use pkgconf_reallocarray stub
2022-06-26 04:38:02 +00:00
Ariadne Conill
c1579d381c
bsdstubs: add pkgconf_reallocarray
2022-06-26 04:37:18 +00:00
Ariadne Conill
4c76f6bf01
meson: check for reallocarray
...
it is needed for the new cache code
2022-06-26 04:33:47 +00:00
Ariadne Conill
464672404e
cache: refactor to use a continguous table and bsearch
...
cache functions are the hottest part of the pkgconf code when
profiled, by removing the linked list for lookups, we can turn
lookups into an O(k) operation
2022-06-26 04:30:35 +00:00