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
...
ci/woodpecker/push/woodpecker Pipeline was successful
Details
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
ci/woodpecker/push/woodpecker Pipeline was successful
Details
2022-08-07 01:29:21 +00:00
Ariadne Conill
662668d082
pkg: add trace log when breaking a circular reference
ci/woodpecker/push/woodpecker Pipeline was successful
Details
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."
...
ci/woodpecker/push/woodpecker Pipeline was successful
Details
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
ci/woodpecker/push/woodpecker Pipeline was successful
Details
2022-06-26 19:35:19 +00:00
Ariadne Conill
a61193c723
pkg: fix sysroot_dir logic for github 213
ci/woodpecker/push/woodpecker Pipeline was successful
Details
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
ci/woodpecker/push/woodpecker Pipeline failed
Details
2022-06-26 18:39:00 +00:00
Ariadne Conill
a1a415111f
queue: handle pkgconf_pkg_verify_dependency failure while flattening
ci/woodpecker/push/woodpecker Pipeline failed
Details
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
ci/woodpecker/push/woodpecker Pipeline failed
Details
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
ci/woodpecker/push/woodpecker Pipeline failed
Details
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
ci/woodpecker/push/woodpecker Pipeline was successful
Details
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
...
ci/woodpecker/push/woodpecker Pipeline was successful
Details
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
...
ci/woodpecker/push/woodpecker Pipeline was successful
Details
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
Dylan Baker
c0fa7879b2
libpkgconf: zero path lists after freeing
...
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This is required to make the pointer safely re-usable after being freed,
otherwise the list still says that it has nodes, but they point nowhere.
This is particularly important for libpkgconf, if a caller needs to
re-enter the library after freeing a path in a static path (such as the
default personality)
2022-06-26 03:12:34 +00:00
Dylan Baker
2d201af326
libpkgconf: Add a helper to zero `pkgconf_list_t`s
2022-06-26 03:12:34 +00:00
Ariadne Conill
cf48b61a59
stdinc: include strings.h on POSIX
2022-02-21 04:42:26 -06:00
Ariadne Conill
0995e49977
Merge branch 'master' into readme-meson
2022-02-21 04:27:11 -06:00
Ariadne Conill
a45dbccc01
Merge pull request #242 from data-man/dirent_latest
...
Update dirent.h to latest
2022-02-21 04:25:36 -06:00
Ariadne Conill
c6cfca6730
Merge pull request #245 from dcbaker/submit/remove-const
...
libpkgconf: remove const modifier from error_handler data pointer
2022-02-21 04:25:26 -06:00
Dylan Baker
c581e24a67
personality: use an unsigned to track initializations
...
Instead of a bool. The latter will result in de-initing leaving the
library unable to init again, which works out for the cli, but is
problematic for other consumers (meson++ and muon).
v2: - Add docs that the functions are not thread safe
2022-02-14 21:22:05 -08:00
Dylan Baker
f5d6bb71f8
libpkgconf: remove const modifier from error_handler data pointer
...
Currently, the data pointer is `const void *`, which means that the
handler can't modify the data without casting away the constness.
2022-02-07 09:34:09 -08:00
data-man
b132ce8317
Update dirent.h to latest
2022-01-08 10:55:28 +05:00
Andrea Pappacoda
6109e06089
docs: mention Meson instead of CMake for Win build
...
Fixes #233
2021-12-11 14:49:19 +01:00
Ariadne Conill
2b82a4f63e
use a serial instead of PKGCONF_PKG_PROPF_SEEN
2021-10-07 00:27:32 -06:00