Commit Graph

189 Commits (b77fbbb0258efeebbf3e081d98f1b8f67f13009c)

Author SHA1 Message Date
William Pitcock 0927ecf1c6 Revert "Actually fix the regression introduced in 7b39c38"
This reverts commit 5e5c418837.
2017-01-22 23:29:59 -06:00
William Pitcock 5554be4986 libpkgconf: queue: chase API change (mark static root virtual packages as static) 2017-01-22 23:28:51 -06:00
William Pitcock 0c01a81299 libpkgconf: split virtual/static package state (this is API/ABI safe, static packages are always treated as virtual when it comes to mutation) 2017-01-22 23:26:01 -06:00
William Pitcock 9ece7cd487 libpkgconf: move sys/stat.h inclusion out of stdinc.h to the only other consumer of sys/stat.h 2017-01-22 23:09:38 -06:00
William Pitcock e5f3dac6e7 libpkgconf: pkg: handle error value from stat(2). 2017-01-22 23:07:39 -06:00
William Pitcock 67796a1d86 libpkgconf: argvsplit: make escape handling more explicit 2017-01-22 23:04:01 -06:00
Igor Gnatenko 5db87c9685 remove dead assignments (#109)
* remove dead assignments

None of them are used.

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>

* The address of an object "&pkgconf_pkg_provides_vermatch_rules[pkgdep->compare]" is never null

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>

* Overrunning array pkgconf_pkg_comparator_names at element index 7

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-01-22 11:31:34 -08:00
Baptiste Daroussin 5e5c418837 Actually fix the regression introduced in 7b39c38 2017-01-22 11:26:43 +01:00
Baptiste Daroussin 17be554a21 Revert "Fix regression introduced in 7b39c38"
This reverts commit 7d89f659ff.
2017-01-22 11:23:24 +01:00
Baptiste Daroussin 7d89f659ff Fix regression introduced in 7b39c38
now pkgconf --variable=pc_path pkg-config works
2017-01-22 10:44:09 +01:00
William Pitcock 7237b811e7 add support for making paths relocatable (closes #103) 2017-01-20 00:58:48 -06:00
William Pitcock ced4f00363 libpkgconf: client: add pkgconf_client_[get|set]_prefix_varname() 2017-01-19 19:16:00 -06:00
William Pitcock 13cf74c7a3 libpkgconf: kill flags from top-level fragment API (ref #105) 2017-01-19 18:23:25 -06:00
William Pitcock 7b39c38408 libpkgconf: pkg: clean up use of flags variable (ref #105) 2017-01-19 18:17:29 -06:00
William Pitcock 127fd037d4 libpkgconf: pkg: uncouple resolver flags from pkgconf_pkg_dir_list_build(). (ref #105) 2017-01-19 17:35:57 -06:00
William Pitcock 0ca6a16ce5 libpkgconf: queue: nuke flags parameters (ref #105) 2017-01-19 17:32:38 -06:00
William Pitcock 597c3c7faf libpkgconf: client: add pkgconf_client_t.flags and a get/set interface for it 2017-01-19 17:22:20 -06:00
William Pitcock 1ee3c12f53 libpkgconf: path: use pkgconf_path_relocate() when matching paths 2017-01-19 10:43:23 -06:00
William Pitcock fa927fd379 libpkgconf: path: pkgconf_path_relocate(): implement realpath backend 2017-01-19 10:36:07 -06:00
William Pitcock 0315832285 doc: document pkgconf_path_relocate() 2017-01-19 10:31:40 -06:00
William Pitcock 4f94090fe4 libpkgconf: fragment: make pkgconf_fragment_filter() accept userdata (closes #106) 2017-01-18 20:25:19 -06:00
William Pitcock b428eeaacf libpkgconf: remove legacy check to ensure pkgconf_pkg_dir_list_build() is only called once.
this is not necessary anymore because:

- we do path entry deduplication
- it is possible that we want to prime the dir list with some user-specified paths prior to building it
2017-01-18 11:29:24 -06:00
William Pitcock 147fd80750 path: relocate system libdir/includedir if appropriate 2017-01-13 20:12:38 -06:00
William Pitcock cb1dc71e23 fragment: simplify pkgconf_fragment_copy_munged() 2017-01-13 20:10:02 -06:00
William Pitcock 87a5a1f0cc path: when stubbing pkgconf_path_relocate(), suppress unused variables warnings 2017-01-13 20:08:22 -06:00
William Pitcock 27c3710521 fragment: when munging, do a path relocation too 2017-01-13 20:06:48 -06:00
William Pitcock 1369f558c6 path: add new pkgconf_path_relocate() API which is a stub when path
relocation is not needed
2017-01-13 20:05:21 -06:00
William Pitcock 7f6a185977 fragment: only munge if sysroot_dir is actually set
on cygwin/msys2, it is possible for munging to be enabled for other types of munging (instead of sysroot)
2017-01-13 19:55:54 -06:00
William Pitcock 4ba414f74a fragment: handle oddball fragments like -framework more accurately 2017-01-07 15:04:34 -06:00
Baptiste Daroussin 3b3f1dc76e Fix gcc warnings 2017-01-07 17:57:37 +01:00
Baptiste Daroussin 2e855972dc inode cache: ensure we never use an unitilized struct stat 2017-01-07 17:52:44 +01:00
Graham Ollis 9c426b6f2c do not filter non-existent directories if filter is off 2016-12-31 14:10:59 -06:00
William Pitcock 0c690dc891 libpkgconf: fragment: fix over-optimization of cflags/linker flags in edge cases involving non-standard options 2016-12-30 12:39:10 -06:00
William Pitcock 92f566ff38 libpkgconf: path: check both device node and inode for dedup. pointed out by @plicease 2016-12-30 11:39:45 -06:00
William Pitcock 2305031573 libpkgconf: path: make the duplicate filtering opt-in. some path lists should not be deduped (compiler path lists, for example) 2016-12-30 11:13:04 -06:00
William Pitcock bad0da0c03 libpkgconf: path: filter out duplicate path entries by inode if possible (closes #102) 2016-12-30 11:01:15 -06:00
William Pitcock aa041b415e libpkgconf: path: add naive path list filtering function 2016-12-30 10:44:01 -06:00
William Pitcock 135da1440c libpkgconf: iter: track list lengths 2016-12-30 09:57:01 -06:00
William Pitcock ad1e414dee libpkgconf: fragment: handle -idirafter in the same way as -isystem
(https://bugs.freedesktop.org/show_bug.cgi?id=97337)
2016-12-30 02:47:42 -06:00
William Pitcock c916e3a437 libpkgconf: client: filter all of the path-related GCC environment variables listed in the GCC manual (not just the ones in pkg-config) 2016-12-30 02:39:18 -06:00
William Pitcock 1ece862e87 libpkgconf: client: some toolchains have C_INCLUDE_PATH and CPLUS_INCLUDE_PATH, treat them as PKG_CONFIG_SYSTEM_INCLUDE_PATH. 2016-12-30 02:35:36 -06:00
William Pitcock 6ef4a853b5 libpkgconf: migrate pkgconf client fragment_is_system_dir() to a libpkgconf API 2016-12-21 20:06:17 -06:00
William Pitcock cd0160a4a2 libpkgconf: handle PKG_CONFIG_SYSTEM_INCLUDE_PATH and PKG_CONFIG_SYSTEM_LIBRARY_PATH environment variables at client init time 2016-12-21 19:55:01 -06:00
William Pitcock f6b074f267 libpkgconf: path: make pkgconf_path_match_list() take a const list argument 2016-12-21 19:50:05 -06:00
William Pitcock 61c750fde3 libpkgconf: pkg: cleanup and document pkg module 2016-12-15 23:36:59 -06:00
William Pitcock 32c8c73d8b libpkgconf: pkg: pkgconf_pkg_find_in_registry_key() should actually be private 2016-12-15 22:57:15 -06:00
William Pitcock 21a6d6cd59 libpkgconf: client: set the error handler to default error handler if NULL was provided for the error handler 2016-12-15 22:33:22 -06:00
William Pitcock 568e5bfd1b libpkgconf: client: move pkgconf_error() and pkgconf_default_error_handler() here 2016-12-15 22:33:01 -06:00
William Pitcock c7e505fe44 libpkgconf: fragment: split out per-fragment length calculation and use it for all render functions (buffer overrun hardening) 2016-12-15 18:32:43 -06:00
William Pitcock 63b3989f24 libpkgconf: document fragment module 2016-12-15 18:27:57 -06:00
William Pitcock 82fa8b21cf libpkgconf: separate config.h from the actual API headers 2016-12-13 12:14:08 -06:00
William Pitcock 487171950b libpkgconf: client: fix doc strings up 2016-12-13 12:06:24 -06:00
Graham Ollis fa87608978 pass client and user data to error handler (#100) 2016-12-13 12:03:59 -06:00
William Pitcock e6c49153ff libpkgconf: document tuple module 2016-12-11 17:28:27 -06:00
William Pitcock 4967c85d49 libpkgconf: document queue module 2016-12-10 23:27:21 -06:00
William Pitcock 4cc0d017da libpkgconf: document path module 2016-12-10 20:14:42 -06:00
William Pitcock af503f210a libpkgconf: document dependency module 2016-12-10 19:57:26 -06:00
William Pitcock 9efa991d98 libpkgconf: update cache docs to new format 2016-12-10 19:40:51 -06:00
William Pitcock 74fbf4e5dc libpkgconf: document audit module 2016-12-10 19:28:34 -06:00
William Pitcock 828c290207 libpkgconf: document argvsplit module 2016-12-10 18:56:09 -06:00
William Pitcock 91fbf683f1 libpkgconf: document client module 2016-12-10 18:35:17 -06:00
William Pitcock b0c821af5c bsdstubs: nothing seems to use strtok_r() anymore, kill it 2016-12-10 16:20:40 -06:00
William Pitcock 8213d91038 libpkgconf: migrate to using the pkgconf_ namespaced strlcat/strlcpy symbols 2016-12-10 16:19:40 -06:00
William Pitcock bdaa26231b bsdstubs: clean up the way this works by namespacing it 2016-12-10 16:16:37 -06:00
William Pitcock eab112fb15 pkg: cleanups 2016-12-10 16:06:18 -06:00
William Pitcock 0ae2d8e5de fragment: fix off-by-one error in pkgconf_fragment_render_len() 2016-12-10 15:47:21 -06:00
William Pitcock d6d7ff775a main: use pkgconf_fragment_render() to render fragment lists instead of custom stuff 2016-12-09 23:07:15 -06:00
William Pitcock 2b5d763e31 main: use pkgconf_fragment_filter() instead of crazy stuff 2016-12-09 22:45:22 -06:00
William Pitcock 0232ee52a3 libpkgconf: fragment: add pkgconf_fragment_filter() to selectively copy a fragment list using a filter function 2016-12-09 22:18:59 -06:00
William Pitcock 0baecbd165 libpkgconf: fragment: mark fragment objects const in several internal functions 2016-12-09 22:06:42 -06:00
William Pitcock 062f0fd331 libpkgconf: pkg: pkgconf_pkg_new_from_file() and children do not need the resolver flags anymore, so remove them 2016-12-09 21:40:19 -06:00
William Pitcock 6e4fd027c3 main: switch to pkgconf_client_set_sysroot_dir() and remove the last vestige of PKGCONF_PKG_PKGF_MUNGE_SYSROOT_PREFIX 2016-12-09 21:37:36 -06:00
William Pitcock a902203054 libpkgconf: fragment: simplify sysroot handling by using pkgconf_client_t.sysroot_dir presence 2016-12-09 21:36:59 -06:00
William Pitcock 792cd7c8e6 libpkgconf: tuple: handle sysroot without the need of PKGCONF_PKG_PKGF_MUNGE_SYSROOT_PREFIX 2016-12-09 21:32:55 -06:00
William Pitcock 38e959857a libpkgconf: client: initialize sysroot and buildroot dirs to reasonable defaults 2016-12-09 21:08:53 -06:00
William Pitcock 92e9b78371 libpkgconf: tuple: when calling pkgconf_tuple_add() on a collection that already has a tuple entry for 'key', replace it instead of adding a new entry 2016-12-09 20:58:15 -06:00
William Pitcock f7b7853932 libpkgconf: tuple: add pkgconf_tuple_free_entry() to free a specific tuple node 2016-12-09 20:50:33 -06:00
William Pitcock 02ec215ecc client: introduce pkgconf_client_t.buildroot_dir and pkgconf_client_t.sysroot_dir members
This adds buildroot and sysroot dir members to the pkgconf client structure, which will allow us to replace
the suboptimal PKGCONF_PKG_PKGF_MUNGE_SYSROOT_PREFIX code.
2016-12-09 20:41:39 -06:00
William Pitcock 3ba3aae783 libpkgconf: client: clean up cache 2016-12-02 00:48:26 -06:00
William Pitcock 011d8c77d6 libpkgconf: audit: migrate to pkgconf_client_t 2016-12-02 00:34:48 -06:00
William Pitcock c05ecdfc9d libpkgconf: migrate cache to pkgconf_client_t which unfortunately requires it to be non-const :( 2016-12-02 00:29:33 -06:00
William Pitcock e7f4846508 libpkgconf: path: add cleanup functions 2016-12-02 00:04:43 -06:00
William Pitcock b7984a795c libpkgconf: commit missing client.c 2016-12-01 15:31:09 -06:00
William Pitcock a300787cef libpkgconf: do not implicitly build the dir list, instead explicitly do it 2016-12-01 15:17:23 -06:00
William Pitcock ad731d1948 libpkgconf: make pkgconf_pkg_dir_list_build() public 2016-12-01 15:11:37 -06:00
William Pitcock 434c465ca9 libpkgconf: migrate pkgconf_error() to use client objects 2016-12-01 15:09:54 -06:00
William Pitcock 8740c5cd55 libpkgconf: begin removing global state from libpkgconf library by introducing a "client" object which holds the state 2016-12-01 15:05:03 -06:00
William Pitcock 4bb46e20e3 libpkgconf: add path matching and environment building functions 2016-11-30 22:36:35 -06:00
William Pitcock f4da1082cb libpkgconf: refactor some path operations 2016-11-30 22:15:13 -06:00
William Pitcock ce165646de fragment: skip empty tokens (closes #99)
Due to the way that tokens are merged together for arguments which require explicit whitespace, an
empty token could result in a fragment like:

    {.type = 'I', .data = '/usr/include '}

Such a fragment would be treated differently than:

    {.type = 'I', .data = '/usr/include'}

This difference causes the compiler to include a system include path as part of the additional includes, thus
breaking things like include path shadowing, resulting in random build failures.  As such, we skip empty tokens
from the tokenizer as they do not have any relevance anyway.
2016-10-25 14:03:25 -05:00
William Pitcock 6484dcb0c2 pkg: pkgconf_pkg_free(): be sure to free the Provides list 2016-09-16 09:59:41 -05:00
William Pitcock b900e04628 pkg: add support for PKGCONF_CMP_NOT_EQUAL Provides rules, completing support of Provides rules (closes #95) 2016-09-10 01:51:19 -05:00
William Pitcock 4fcda862a4 pkg: make fuzzy Provides matching for PKG_CMP_NOT_EQUAL ops more correct 2016-09-09 14:34:38 -05:00
William Pitcock 892a03cd8c pkg: fill in a lot of the fuzzy matching stuff (but some of it may be wrong, needs to be looked at) 2016-09-09 01:04:26 -05:00
William Pitcock 7c0264ac7a pkg: implement rudementary support for fuzzy Provides matches 2016-09-09 00:17:46 -05:00
William Pitcock c2c7e7488e pkg: add a more flexible framework for multi-level compare required for fuzzy Provides rules. 2016-09-08 23:54:57 -05:00
William Pitcock 9783181cce pkg: make pkgconf_vercmp_res_func_t more generic, allowing it to be used for Provides rules. 2016-09-08 23:23:15 -05:00
William Pitcock d304d9cb2e pkg: add support for 'simple' Provides rule entries (#95) 2016-09-08 22:10:24 -05:00
William Pitcock bbe6dcc088 pkg: make pkgconf_scan_all() API more flexible to allow it to scan until it finds a qualifying pkgconf_pkg_t 2016-08-27 09:48:53 -05:00
William Pitcock 5ba46130d2 pkg: add anchor Provides entry once the .pc file is parsed, instead of faking it in the tool 2016-08-26 23:43:36 -05:00