Compare commits
2 Commits
5ef2ab8c7c
...
f49029c681
Author | SHA1 | Date |
---|---|---|
Ariadne Conill | f49029c681 | |
Ariadne Conill | 4fb0988a29 |
21
cli/main.c
21
cli/main.c
|
@ -289,18 +289,26 @@ apply_digraph(pkgconf_client_t *client, pkgconf_pkg_t *world, void *unused, int
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
apply_modversion(pkgconf_client_t *client, pkgconf_pkg_t *world, void *unused, int maxdepth)
|
apply_modversion(pkgconf_client_t *client, pkgconf_pkg_t *world, void *data, int maxdepth)
|
||||||
{
|
{
|
||||||
pkgconf_node_t *iter;
|
pkgconf_node_t *queue_iter;
|
||||||
|
pkgconf_list_t *pkgq = data;
|
||||||
(void) client;
|
(void) client;
|
||||||
(void) unused;
|
|
||||||
(void) maxdepth;
|
(void) maxdepth;
|
||||||
|
|
||||||
PKGCONF_FOREACH_LIST_ENTRY(world->required.head, iter)
|
PKGCONF_FOREACH_LIST_ENTRY(pkgq->head, queue_iter)
|
||||||
{
|
{
|
||||||
pkgconf_dependency_t *dep = iter->data;
|
pkgconf_node_t *world_iter;
|
||||||
|
pkgconf_queue_t *queue_node = queue_iter->data;
|
||||||
|
|
||||||
|
PKGCONF_FOREACH_LIST_ENTRY(world->required.head, world_iter)
|
||||||
|
{
|
||||||
|
pkgconf_dependency_t *dep = world_iter->data;
|
||||||
pkgconf_pkg_t *pkg = dep->match;
|
pkgconf_pkg_t *pkg = dep->match;
|
||||||
|
|
||||||
|
if (strncmp(pkg->id, queue_node->package, strlen(pkg->id)))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (pkg->version != NULL) {
|
if (pkg->version != NULL) {
|
||||||
if (verbosity)
|
if (verbosity)
|
||||||
printf("%s: ", pkg->id);
|
printf("%s: ", pkg->id);
|
||||||
|
@ -308,6 +316,7 @@ apply_modversion(pkgconf_client_t *client, pkgconf_pkg_t *world, void *unused, i
|
||||||
printf("%s\n", pkg->version);
|
printf("%s\n", pkg->version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1430,7 +1439,7 @@ cleanup3:
|
||||||
if ((want_flags & PKG_MODVERSION) == PKG_MODVERSION)
|
if ((want_flags & PKG_MODVERSION) == PKG_MODVERSION)
|
||||||
{
|
{
|
||||||
want_flags &= ~(PKG_CFLAGS|PKG_LIBS);
|
want_flags &= ~(PKG_CFLAGS|PKG_LIBS);
|
||||||
apply_modversion(&pkg_client, &world, NULL, 2);
|
apply_modversion(&pkg_client, &world, &pkgq, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((want_flags & PKG_PATH) == PKG_PATH)
|
if ((want_flags & PKG_PATH) == PKG_PATH)
|
||||||
|
|
|
@ -67,6 +67,7 @@ typedef struct pkgconf_fragment_ pkgconf_fragment_t;
|
||||||
typedef struct pkgconf_path_ pkgconf_path_t;
|
typedef struct pkgconf_path_ pkgconf_path_t;
|
||||||
typedef struct pkgconf_client_ pkgconf_client_t;
|
typedef struct pkgconf_client_ pkgconf_client_t;
|
||||||
typedef struct pkgconf_cross_personality_ pkgconf_cross_personality_t;
|
typedef struct pkgconf_cross_personality_ pkgconf_cross_personality_t;
|
||||||
|
typedef struct pkgconf_queue_ pkgconf_queue_t;
|
||||||
|
|
||||||
#define PKGCONF_ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
|
#define PKGCONF_ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
|
||||||
|
|
||||||
|
@ -82,6 +83,11 @@ typedef struct pkgconf_cross_personality_ pkgconf_cross_personality_t;
|
||||||
#define LIBPKGCONF_VERSION 20000
|
#define LIBPKGCONF_VERSION 20000
|
||||||
#define LIBPKGCONF_VERSION_STR "2.0.0"
|
#define LIBPKGCONF_VERSION_STR "2.0.0"
|
||||||
|
|
||||||
|
struct pkgconf_queue_ {
|
||||||
|
pkgconf_node_t iter;
|
||||||
|
char *package;
|
||||||
|
};
|
||||||
|
|
||||||
struct pkgconf_fragment_ {
|
struct pkgconf_fragment_ {
|
||||||
pkgconf_node_t iter;
|
pkgconf_node_t iter;
|
||||||
|
|
||||||
|
|
|
@ -29,11 +29,6 @@
|
||||||
* Using the `queue` module functions is the recommended way of working with dependency graphs.
|
* Using the `queue` module functions is the recommended way of working with dependency graphs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
pkgconf_node_t iter;
|
|
||||||
char *package;
|
|
||||||
} pkgconf_queue_t;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* !doc
|
* !doc
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue