Commit Graph

130 Commits (cd6d52b965f7ef8dc2910d6b14ca5447a9eaf397)

Author SHA1 Message Date
William Pitcock 52dee220ee pkg: plug memory leak in conflicts code 2012-05-11 21:20:00 -05:00
William Pitcock db9f626790 pkg: if pkg_traverse() fails, abort walking the graph. 2012-05-11 21:01:42 -05:00
William Pitcock 298a37868c pkg: return PKG_ERRF_PACKAGE_CONFLICT only if a conflict has been formally verified 2012-05-11 21:00:01 -05:00
William Pitcock 9c335f161a pkg: when walking a list, get eflags from pkg_traverse() call 2012-05-11 20:59:35 -05:00
William Pitcock 6c1ace0aa7 pkg: add conflicts graph node verification (issue #13) 2012-05-11 20:51:13 -05:00
William Pitcock 2ecb181fe6 pkg: add pkg_libs() for calculating the mergemaster set of linker flags (issue #11) 2012-05-11 20:16:22 -05:00
William Pitcock e6cf8b4021 pkg: add pkg_cflags() for calculating a mergemastered list of cflag fragments for a problem set (issue #11) 2012-05-11 20:13:03 -05:00
William Pitcock 559ae0951d pkg: pass PKGF_* flags to traverse funcs 2012-05-11 19:58:34 -05:00
William Pitcock acf2ee260b pkg: use typename enforcement on pkg_traverse() 2012-05-11 19:56:38 -05:00
William Pitcock bb41d143cc pkg: get rid of PKG_LOCAL_COPY() since it was only used in one place 2012-05-11 13:59:18 -05:00
William Pitcock 56fbf25c8a Move all portability gunk into stdinc.h. (Issue #18) 2012-05-11 13:47:20 -05:00
William Pitcock 4b193018a4 pkg: clean up pkg_find() by adding pkg_try_specific_path(). (issue #16) 2012-05-07 03:57:28 -05:00
Michał Górny c203beb902 Support getting PKG_CONFIG_PATH from win32 registry. 2012-05-07 10:23:46 +02:00
William Pitcock f1bd223f7f pkg: disable PKGF_SKIP_ROOT_VIRTUAL when recursing 2012-05-06 23:28:42 -05:00
William Pitcock f663f7922c pkg: add PKGF_SKIP_ROOT_VIRTUAL for some queries like --variable 2012-05-06 23:26:21 -05:00
William Pitcock 688c07890a parse: remove remaining function (pkg_t constructor) to pkg.c 2012-05-06 23:00:06 -05:00
William Pitcock 4eb08d7c1f pkg: clean up foreach_list_entry* macros (issue #10) 2012-05-06 22:55:00 -05:00
William Pitcock 9eea62fbc6 pkg: LOCAL_COPY() becomes PKG_LOCAL_COPY(). 2012-05-06 22:52:05 -05:00
William Pitcock a961a523f7 pkg: cleanups 2012-05-06 22:38:44 -05:00
William Pitcock db6d0e2309 pkg: parse_file is now pkg_new_from_file 2012-05-06 22:24:36 -05:00
William Pitcock 4f50dad147 pkg: provide error return codes for pkg_traverse() and pkg_verify_graph(). 2012-05-06 21:42:15 -05:00
William Pitcock 6646e99a37 pkg: pkg_report_graph_error(): free pkg when exiting 2012-05-06 21:30:35 -05:00
William Pitcock 5122d5eecb pkg: do not allocate an id for a virtual package 2012-05-06 21:30:14 -05:00
William Pitcock 9d2bd0b66d pkg: plug memory leaks 2012-05-06 21:09:26 -05:00
William Pitcock 4d027a4366 pkg: fix out-of-boundary write caused by realloc() semantics 2012-05-06 20:59:03 -05:00
William Pitcock 29ca5b7eee pkg: free packages constructed while walking the dependency graph 2012-05-06 20:39:26 -05:00
William Pitcock d99f3db88e pkg: make pkg-config builtin package "virtual" 2012-05-06 20:39:10 -05:00
William Pitcock 4172dc545f pkg: don't free builtin (virtual) packages 2012-05-06 20:38:48 -05:00
William Pitcock 3eb16dca0f pkg: add pkg_free() 2012-05-06 20:30:50 -05:00
William Pitcock 24265bb18e pkg: add PKGF_NO_UNINSTALLED resolver flag 2012-05-06 19:49:15 -05:00
William Pitcock ed126f5b5b pkg: add support for PKG_CONFIG_LIBDIR env variable 2012-05-06 19:44:22 -05:00
William Pitcock 44ef839175 pkg: reset iter to 0 when checking system compiled-in paths 2012-05-06 01:02:57 -05:00
William Pitcock a078249a60 pkg: add support for treating package names as files 2012-05-06 00:12:27 -05:00
William Pitcock 65d4b88dbc pkg: add support for foo-uninstalled.pc file 2012-05-05 23:00:20 -05:00
William Pitcock 1bf5da3ba4 pkg: implement pkg-config.pc as a builtin 2012-05-05 22:00:47 -05:00
William Pitcock 4adb0b5dc6 pkg: clean up pkg_traverse() logic 2012-05-05 20:52:17 -05:00
William Pitcock 83ba295077 pkg: add support for compiling in more than one default pkg-config search path
Some packages install to /usr/share/pkgconfig instead of /usr/lib/pkgconfig.
2012-05-05 20:24:45 -05:00
William Pitcock 7f7ad67bb2 pkg: fix off-by-one when parsing PKG_CONFIG_PATH data 2012-05-05 20:21:47 -05:00
William Pitcock 49a5eddad1 pkg: add pkg_report_graph_error() for describing breaks in the dependency graph.
Fixes issue #3.
2012-05-03 17:55:06 +00:00
William Pitcock 91ec341a92 pkg: pkg_verify_dependency(): add return error flags pointer.
presently, three error flags are defined:

PKG_ERRF_OK: everything went fine (no error)

PKG_ERRF_PACKAGE_NOT_FOUND: a graph node couldn't be verified because there was no
                            database entry for it

PKG_ERRF_PACKAGE_VER_MISMATCH: a graph node couldn't be verified because the entry
                               in the database did not match versioning constraints
2012-05-03 17:42:04 +00:00
William Pitcock 1caa0dca87 pkg: pkg_walk_list() does not need a reference to the parent node in the graph 2012-05-03 17:20:39 +00:00
William Pitcock ccda6b3752 everywhere: warning cleanups 2012-05-03 17:15:45 +00:00
William Pitcock 3f758a8bae pkg: pkg_verify_graph() should also accept resolver flags 2012-05-02 23:29:35 +00:00
William Pitcock e59b9864ea pkg: implement resolver-side support for some pkg-config clone's --env-only option 2012-05-02 23:16:32 +00:00
William Pitcock 187b4e538f pkg: add resolver flags to pkg_find() and pkg_verify_dependency(). 2012-05-02 23:14:53 +00:00
William Pitcock 38f3dc78a9 pkg: if PKGF_SEARCH_PRIVATE is requested, search root::requires_private graph entries too 2012-05-02 21:47:02 +00:00
William Pitcock 5ea52d4cae pkg: add flags option to pkg_traverse() to optionally control what the depgraph traversal code does 2012-05-02 21:44:58 +00:00
William Pitcock 656b34fb45 pkg: plug some minor memory leaks 2012-05-02 19:35:45 +00:00
William Pitcock 77703f1841 pkg: path_split(): clarify that we want to dereference parv itself, not parv[idx]. 2012-05-02 19:31:30 +00:00
William Pitcock ca4843822f pkg: use PKG_CONFIG_EXT everywhere 2012-05-02 19:11:20 +00:00
William Pitcock 52433aa27a pkg: clean up PKG_CONFIG_PATH_SEP_S nonsense 2012-05-02 19:07:38 +00:00
William Pitcock b91bdcd31a pkg: use path_split() instead of a static buffer. 2012-05-02 19:06:32 +00:00
William Pitcock 538317f6c5 pkg: add path_split() helper function 2012-05-02 18:38:31 +00:00
Michał Górny 3707ccd221 Fix PKG_CONFIG_PATH precedence, simplify.
PKG_CONFIG_PATH paths must take precedence over the default path.
Otherwise, we would be unable to override default .pc files.

And while I'm at it, simplify the whole code. It is pointless to
introduce another buffer and a lot of string mangling for one additional
path.
2012-05-02 16:02:05 +02:00
Michał Górny 0e0bf1b0fb Omit empty paths in file lookup.
This avoids looking for '/foo.pc'.
2012-05-02 11:45:31 +02:00
Michał Górny 218b3ccd25 Remove unnecessary buffer zeroing.
We always replace that current pos with a null terminator, so it doesn't
matter what follows it.
2012-05-02 11:42:52 +02:00
Michał Górny f26001c3f8 File lookup: wind in last occurence to the loop.
Instead of repeating the parsing stage after reaching the null
terminator, just handle it inside the loop and terminate the loop
afterwards.
2012-05-02 11:40:38 +02:00
Michał Górny 353ba1eafe Use ';' as path separator on win32.
This is what pkg-config does, and it is necessary because ':' is part of
path specification on win32.
2012-05-02 11:24:58 +02:00
William Pitcock 2d738c2c40 pkg: make PKG_CONFIG_PATH parsing more robust 2012-05-01 01:27:19 +00:00
William Pitcock 3b154d8a5a everywhere: use strlcpy and strlcat where appropriate 2012-04-30 06:06:13 +00:00
Mike Frysinger 4e4c1d628a fix handling of length with strncat
The length arg in the strncat func represents the max number of bytes
that may be appended, but the total length of the buffer.  So we have
to subtract the length of bytes already in there.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-30 05:24:10 +00:00
William Pitcock 1e93bac383 pkg: handle PKG_DEFAULT_PATH and PKG_CONFIG_PATH envvar more cleanly 2012-02-17 15:35:23 -06:00
Alyx d0639b3353 Make pkg_find() follow the PKG_CONFIG_PATH environmental variable, if available. 2012-01-15 19:03:54 -06:00
William Pitcock b0c16941ce pkg: add pkg_t.id field 2011-07-26 20:37:01 -05:00
William Pitcock 8543f1bdd4 pkg: document pkg_traverse() 2011-07-26 20:15:44 -05:00
William Pitcock 648c39cf8e pkg: add pkg_get_comparator() 2011-07-26 19:59:46 -05:00
William Pitcock 774ebc9716 pkg: pkg_verify_dependency() was calling pkg_compare_version() in reverse order 2011-07-26 19:52:44 -05:00
William Pitcock f8638cdb68 pkg: add pkg_verify_dependency() 2011-07-26 12:17:45 -05:00
William Pitcock a872c7254b pkg: fix up pkg_compare_version() 2011-07-26 12:05:14 -05:00
William Pitcock 7e26842094 pkg: add pkg_compare_version() 2011-07-26 11:56:59 -05:00
William Pitcock 8100eb84f0 pkg: add pkg_verify_graph() to verify the depgraph is satisfiable 2011-07-25 17:44:05 -05:00
William Pitcock 3d502159e6 pkg: use exact same error message as pkg-config when dependency is unresolvable 2011-07-25 17:03:06 -05:00
William Pitcock 4fe2dc1b96 pkg: croak if dependency tree is incomplete 2011-07-25 01:26:05 -05:00
William Pitcock 05d596b9bc pkg: implement maximum depth for pkg_traverse() 2011-07-25 01:22:04 -05:00
William Pitcock a3f2a47136 pkg: handle node::package being crap 2011-07-25 01:03:13 -05:00
William Pitcock 4603ceb885 main: split out to main.c, make pretty printers hidden 2011-07-24 23:46:10 -05:00
William Pitcock 37d87b9006 pkg: do not print cflags or libs if they are NULL 2011-07-24 23:43:00 -05:00
William Pitcock b44ce20d29 pkg: add pkg_traverse() to walk the dependency graph 2011-07-24 23:39:15 -05:00
William Pitcock 3f9cedf532 pkgconf stub: walk the dependency tree 2011-07-24 23:20:22 -05:00
William Pitcock 61c246d27e Initial commit. 2011-07-24 21:03:17 -05:00