Commit Graph

1517 Commits (d2d01a10c547477d4a0123305323c912e87d3d8c)

Author SHA1 Message Date
Ariadne Conill d2d01a10c5 tests: add regression test fixture for github issue #286 2024-08-06 23:31:30 -07:00
Ariadne Conill 9aaff5148c bomtool: only use query dependencies for deriving the SBOM document name 2024-08-06 15:12:27 -07:00
Ariadne Conill eb7c2385d0 tests: add test for --variable with --env 2024-08-06 10:43:52 -07:00
Ariadne Conill 0ca4e5d00c cli: allow --env to work with --variable 2024-08-06 10:42:18 -07:00
Ariadne Conill 2070c00d63 cli: stop processing requests after the --env handler runs 2024-08-06 10:41:23 -07:00
Ariadne Conill ef99b6c626 tests: add test for --print-variables with --env 2024-08-06 10:10:02 -07:00
Ariadne Conill ca2a06898f cli: add integration for --print-variables with --env 2024-08-06 09:23:10 -07:00
Ariadne Conill c84223616a tests: add test for --libs with --env 2024-08-05 16:45:56 -07:00
Ariadne Conill d8cd27e2d2 tests: add test for --exists-cflags with --env 2024-08-05 16:43:54 -07:00
Ariadne Conill 22866eca45 cli: document --env in usage text 2024-08-05 16:42:05 -07:00
Ariadne Conill b24f3dfd8f cli: implement --exists-cflags support for --env 2024-08-05 16:39:51 -07:00
Ariadne Conill d5cd2a4f28 tests: add basic --exists-cflags test 2024-08-05 16:31:37 -07:00
Ariadne Conill f635f63220 cli: add module definitions before filter check 2024-08-05 16:29:52 -07:00
Ariadne Conill d76aa357e4 cli: implement --exists-cflags feature
This feature adds autoconf-style -DHAVE_FOO definitions to the
--cflags output when it is requested.  This has been requested
a few times over the years as it allows for simplifying build
system logic in scenarios where a standalone Makefile or similar
build process is used without a configuration step.
2024-08-05 14:29:53 -07:00
Ariadne Conill 174db1a17a fragment: add pkgconf_fragment_insert() 2024-08-05 14:27:13 -07:00
Ariadne Conill a6179c7779 queue: add PKGCONF_PKG_DEPF_QUERY to color solution nodes part of the original query 2024-08-05 13:42:49 -07:00
Ariadne Conill a276c0b4a8 main: add --exists-cflags command-line option 2024-08-05 13:22:05 -07:00
Ariadne Conill 93ae120daf build (automake): add -I m4 to ACLOCAL_AMFLAGS
libtoolize was warning about this flag being missing.
2024-08-05 13:08:36 -07:00
Kai Pastor 8b7e2c4eee Process character after operator 2024-08-05 12:58:58 -07:00
Kai Pastor 64ff8b031f Test version expressions 'mod >=n' 2024-08-05 12:58:58 -07:00
Taylor R Campbell 633433b29b Fix uncasted use of isspace()
isspace() is intended to be used with an unsigned 8-bit input.
Using isspace() with any other type of input is technically
undefined behavior.
2024-08-05 12:53:11 -07:00
Petr Písař 2d26db3a98 doc: Requires.private is used for header inclusion
Document that "pkgconf --cflags" inherits paths for including headers
from dependencies listed in Requires.private.

https://github.com/pkgconf/pkgconf/issues/300
https://github.com/pkgconf/pkgconf/issues/352
2024-04-25 23:50:21 -07:00
Pierce a8a492e2e4 Fix typo in README.md 2024-04-25 23:49:39 -07:00
Ismael Luceno c583d49a37 pkg.m4: Abort by default if no pkgconf
Provide a second optional argument to PKG_PROG_PKG_CONFIG with an action to
take if no pkgconf is found, and default to aborting.

Too many configure scripts in the wild don't handle an empty PKG_CONFIG,
resulting in weird error messages through the run, which often confuse
users.

Authors wishing to fallback to other methods can either return to the old
behavior by specifying [:] as an action, or use [PKG_CONFIG=false] and call
pkg-config macros normally, handling the fallback as any other failure.

Users can override PKG_CONFIG in the command line so this should imply no
regression.

Closes: https://github.com/pkgconf/pkgconf/issues/350
Ref: https://gitlab.freedesktop.org/pkg-config/pkg-config/-/issues/69
Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
2024-04-25 23:48:18 -07:00
Ariadne Conill 06120a8769 pkgconf 2.2.0 2024-03-27 18:39:44 +00:00
Ariadne Conill 7a8532f849 queue: remove no longer used root package reference when walking dependency graphs 2024-03-27 18:39:43 +00:00
Ariadne Conill a3d7ecb31b Use libpkgconf.so.5 due to ABI changes 2024-03-27 11:31:48 -07:00
Kai Pastor e2a8080cbf Reuse static solution for general solution 2024-03-27 11:15:04 -07:00
Kai Pastor 883b57df47 Cache packages from explicit file requests 2024-03-27 11:15:04 -07:00
Kai Pastor 194dde096b Update expected test results 2024-03-27 11:15:04 -07:00
Kai Pastor 78d53ea012 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.
2024-03-27 11:15:04 -07:00
Kai Pastor 4090ba3e0d Clarify tracing messages 2024-03-27 11:15:04 -07:00
Kai Pastor 5eb79f6651 Add tests for lib order 2024-03-27 11:15:04 -07:00
Kai Pastor e7c9bdb317 Don't print 'required by <VIRTUAL-PACKAGE>' 2024-03-27 11:09:16 -07:00
Kai Pastor 4e01010d6f Mark user input in error message 2024-03-27 11:09:16 -07:00
Kai Pastor 6219af9a0a Color private-reachable nodes gray 2024-03-27 11:06:30 -07:00
Kai Pastor eaf1a2d804 Resolve user request for digraph 2024-03-27 11:06:30 -07:00
Kai Pastor d6753888b8 Update test expected results 2024-03-27 11:06:30 -07:00
Kai Pastor f95e8d4428 Print digraph for user request perspective 2024-03-27 11:06:30 -07:00
Kai Pastor db63c8ee0b Show edges for flattened order 2024-03-27 11:06:30 -07:00
Kai Pastor b6e04e2d47 pkgconf 2.1.1 2024-02-04 03:26:15 -08:00
Ariadne Conill 2edf954f3a Update NEWS for pkgconf 2.1.1 2024-02-04 03:25:54 -08:00
Ariadne Conill d8924aced5 Update gitignore to catch all of the autoconf-generated files 2024-02-04 03:16:14 -08:00
Ariadne Conill 80b5011e69 Use traverse_serial to short circuit graph evaluation for already visited nodes.
In our previous attempt to optimize this problem, we did not track the type of the
visit to the node, e.g. whether it came from evaluating Requires or Requires.private,
which resulted in some solutions being correctly incalculated due to greedy optimization
of the dependency graph.

We reintroduce this optimization by adding a second traversal serial as well as
re-introducing the PROPF_VISITED node property as well as a new PROPF_VISITED_PRIVATE
node property flag.  This allows a node to be revisted at maximum two times per
traversal level.

Co-authored-by: Yi Chou <yich@google.com>
2024-02-04 03:04:52 -08:00
Kai Pastor 4a3adf3457 Test digraph completeness for private-libs-duplication
Complements 45073b7.
2024-02-04 02:37:14 -08:00
Kai Pastor 5825e2c6d6 Fix crash on two-word expressions 2023-12-05 10:50:18 -07:00
Kai Pastor b2f8386c32 Fix --modversion output 2023-12-05 10:50:18 -07:00
Kai Pastor 125af82dbe Test --modversion with constraint 2023-12-05 10:50:18 -07:00
Sam James 08f4a9da15 NEWS: fix typo
Signed-off-by: Sam James <sam@gentoo.org>
2023-11-29 12:03:11 -08:00
Stefan Weil a4ecd42bf3 Fix it's -> its
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2023-11-29 12:02:44 -08:00