Ariadne Conill
4e449bd45f
cli: do not search requires.private for --libs unless --static
2022-08-08 09:42:01 +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
760d1eea10
cli: use pkgconf_queue_solve instead of pkgconf_queue_apply
2022-08-08 09:27:39 +00:00
Ariadne Conill
8764578719
tests: ignore stdout on regress:missing test
2022-08-08 09:26:22 +00:00
Ariadne Conill
5b10a85a82
queue: add pkgconf_queue_solve API
2022-08-08 09:08:27 +00:00
Ariadne Conill
884a88583b
tests: add testcase for requires.private debounce
2022-08-08 08:56:53 +00:00
Ariadne Conill
4e8f376c5d
tests: add fixtures for github #258
2022-08-08 05:26:00 +00:00
Ariadne Conill
79d25f979d
queue: ensure private deps get flattened when --static is requested
2022-08-08 00:58:55 +00:00
Ariadne Conill
03ba00d30b
Merge pull request 'bsdstubs: include errno.h' ( #242 ) from dcbaker/pkgconf:bsdstubs-errno into master
...
Reviewed-on: ariadne/pkgconf#242
2022-08-08 00:51:32 +00:00
Ariadne Conill
1a66d963cf
pkgconf 1.9.1.
2022-08-08 00:44:23 +00:00
Ariadne Conill
8271ea1952
NEWS: update for pkgconf 1.9.1.
2022-08-08 00:43:20 +00:00
Ariadne Conill
b29f9d8713
cli: do not flatten or traverse the graph when asking for module-specific values
2022-08-08 00:40:52 +00:00
Ariadne Conill
94b3f118cc
tests: add regression test to catch --modversion regression introduced by new solver
2022-08-08 00:37:07 +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
23556ff818
Bump libpkgconf SOVERSION for 1.9.0 changes.
2022-08-07 04:46:35 +00:00
Ariadne Conill
da9b2cfbc1
NEWS: note the SPDX license branch has been merged
2022-08-07 04:45:33 +00:00
Ariadne Conill
b2579a661b
man: pc(5): document the License field
2022-08-07 04:42:55 +00:00
Ariadne Conill
666b520273
tests: add tests for SPDX license assertions
2022-08-07 04:40:31 +00:00
Ariadne Conill
d5f9bdae57
cli: add support for dumping SPDX expressions from modules
2022-08-07 04:40:19 +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
dce34e9afd
Update NEWS for pending 1.9.0 release
2022-08-07 04:13:43 +00:00
Ariadne Conill
9aa0006c27
tests: improve circular reference tests to make use of the circular reference diagnostic
2022-08-07 01:35:12 +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
Eli Schwartz
59a56dfa64
trivial sync of pkg.m4 from freedesktop
...
This contains 3 changes, mostly inconsequential:
- fix some spelling issues in the comments
eb866ade77
- bump the serial number; upstream rationale is very 🤷 but it is
what it is:
> There aren't any significant changes here, but this will cause aclocal
> to get the latest version.
677e924875
- make the status log for PKG_CHECK_MODULES say "checking for <mod>..."
instead of "checking for <VAR>..."
3b96e7434c
There are additional whitespace-only changes that could be synced, and
were explicitly synced in commit 95b683c864
but then undone in commit 360a818f2f
so
rather than fighting over it, are simply ignored. Diffing against the
freedesktop version of pkg.m4 will therefore show additional
inconsistencies.
2022-08-07 00:40:17 +00:00
Ariadne Conill
56881f64f0
cli: resolve uninitialized pointer warnings reported by GCC 12
2022-08-07 00:38:38 +00:00
Ariadne Conill
b310728111
Merge pull request 'Do a better job cleaning up memory' ( #239 ) from dcbaker/pkgconf:free-memory into master
...
Reviewed-on: ariadne/pkgconf#239
2022-08-04 23:36:15 +00:00
Dylan Baker
179a0560a6
ci: run meson test with the address sanitizer enabled
...
Set the ASAN_OPTION so that the exitcode is not 1, this avoids asan
returning the exitcode that the tests already expect from a normal
pkgconf error
2022-08-04 15:52:10 -07: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
4493a322f6
main: do cleanup when checking required version
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
38103134a5
main: goto cleanup in validate case too
...
This fixes leaks in two tests
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
Ariadne Conill
d240afe7d9
Merge pull request 'Fix macro definition interfering with -Wmisleading-indentation' ( #241 ) from dcbaker/pkgconf:submit/misleading-indentation into master
...
Reviewed-on: ariadne/pkgconf#241
2022-08-04 04:33:11 +00:00
Dylan Baker
125a13d3b9
meson: add -Wmisleading-indentation
...
A useful warning when loop and conditional statements are allowed
without braces.
2022-08-03 12:03:15 -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
a042827951
Merge pull request 'meson cleanups and fixes' ( #240 ) from dcbaker/pkgconf:submit/meson-cleanups into master
...
Reviewed-on: ariadne/pkgconf#240
2022-08-02 23:09:24 +00:00