Compare commits
No commits in common. "5f6c5320e54d9427d2b58757c38f2d9edc83fbac" and "be1ea7888bc7e882a6c1e17573be35a08b5637e9" have entirely different histories.
5f6c5320e5
...
be1ea7888b
28
cli/main.c
28
cli/main.c
|
@ -71,7 +71,6 @@
|
||||||
#define PKG_DUMP_PERSONALITY (((uint64_t) 1) << 43)
|
#define PKG_DUMP_PERSONALITY (((uint64_t) 1) << 43)
|
||||||
#define PKG_SHARED (((uint64_t) 1) << 44)
|
#define PKG_SHARED (((uint64_t) 1) << 44)
|
||||||
#define PKG_DUMP_LICENSE (((uint64_t) 1) << 45)
|
#define PKG_DUMP_LICENSE (((uint64_t) 1) << 45)
|
||||||
#define PKG_SOLUTION (((uint64_t) 1) << 46)
|
|
||||||
|
|
||||||
static pkgconf_client_t pkg_client;
|
static pkgconf_client_t pkg_client;
|
||||||
static const pkgconf_fragment_render_ops_t *want_render_ops = NULL;
|
static const pkgconf_fragment_render_ops_t *want_render_ops = NULL;
|
||||||
|
@ -294,25 +293,6 @@ apply_digraph(pkgconf_client_t *client, pkgconf_pkg_t *world, void *unused, int
|
||||||
printf("}\n");
|
printf("}\n");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
print_solution_node(pkgconf_client_t *client, pkgconf_pkg_t *pkg, void *unused)
|
|
||||||
{
|
|
||||||
(void) client;
|
|
||||||
(void) unused;
|
|
||||||
|
|
||||||
printf("%s (%"PRIu64")\n", pkg->id, pkg->identifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool
|
|
||||||
apply_print_solution(pkgconf_client_t *client, pkgconf_pkg_t *world, void *unused, int maxdepth)
|
|
||||||
{
|
|
||||||
int eflag;
|
|
||||||
|
|
||||||
eflag = pkgconf_pkg_traverse(client, world, print_solution_node, unused, maxdepth, 0);
|
|
||||||
|
|
||||||
return eflag == PKGCONF_PKG_ERRF_OK;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
@ -753,7 +733,6 @@ usage(void)
|
||||||
printf(" --print-variables print all known variables in module to stdout\n");
|
printf(" --print-variables print all known variables in module to stdout\n");
|
||||||
#ifndef PKGCONF_LITE
|
#ifndef PKGCONF_LITE
|
||||||
printf(" --digraph print entire dependency graph in graphviz 'dot' format\n");
|
printf(" --digraph print entire dependency graph in graphviz 'dot' format\n");
|
||||||
printf(" --solution print dependency graph solution in a simple format\n");
|
|
||||||
#endif
|
#endif
|
||||||
printf(" --keep-system-cflags keep -I%s entries in cflags output\n", SYSTEM_INCLUDEDIR);
|
printf(" --keep-system-cflags keep -I%s entries in cflags output\n", SYSTEM_INCLUDEDIR);
|
||||||
printf(" --keep-system-libs keep -L%s entries in libs output\n", SYSTEM_LIBDIR);
|
printf(" --keep-system-libs keep -L%s entries in libs output\n", SYSTEM_LIBDIR);
|
||||||
|
@ -906,7 +885,6 @@ main(int argc, char *argv[])
|
||||||
{ "print-variables", no_argument, &want_flags, PKG_VARIABLES|PKG_PRINT_ERRORS, },
|
{ "print-variables", no_argument, &want_flags, PKG_VARIABLES|PKG_PRINT_ERRORS, },
|
||||||
#ifndef PKGCONF_LITE
|
#ifndef PKGCONF_LITE
|
||||||
{ "digraph", no_argument, &want_flags, PKG_DIGRAPH, },
|
{ "digraph", no_argument, &want_flags, PKG_DIGRAPH, },
|
||||||
{ "solution", no_argument, &want_flags, PKG_SOLUTION, },
|
|
||||||
#endif
|
#endif
|
||||||
{ "help", no_argument, &want_flags, PKG_HELP, },
|
{ "help", no_argument, &want_flags, PKG_HELP, },
|
||||||
{ "env-only", no_argument, &want_flags, PKG_ENV_ONLY, },
|
{ "env-only", no_argument, &want_flags, PKG_ENV_ONLY, },
|
||||||
|
@ -1470,12 +1448,6 @@ cleanup3:
|
||||||
want_flags &= ~(PKG_CFLAGS|PKG_LIBS);
|
want_flags &= ~(PKG_CFLAGS|PKG_LIBS);
|
||||||
apply_digraph(&pkg_client, &world, NULL, 2);
|
apply_digraph(&pkg_client, &world, NULL, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((want_flags & PKG_SOLUTION) == PKG_SOLUTION)
|
|
||||||
{
|
|
||||||
want_flags &= ~(PKG_CFLAGS|PKG_LIBS);
|
|
||||||
apply_print_solution(&pkg_client, &world, NULL, 2);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((want_flags & PKG_MODVERSION) == PKG_MODVERSION)
|
if ((want_flags & PKG_MODVERSION) == PKG_MODVERSION)
|
||||||
|
|
|
@ -113,10 +113,9 @@ pkgconf_queue_collect_dependents(pkgconf_client_t *client, pkgconf_pkg_t *pkg, v
|
||||||
|
|
||||||
PKGCONF_FOREACH_LIST_ENTRY(pkg->required.head, node)
|
PKGCONF_FOREACH_LIST_ENTRY(pkg->required.head, node)
|
||||||
{
|
{
|
||||||
pkgconf_dependency_t *parent_dep = node->data;
|
|
||||||
pkgconf_dependency_t *flattened_dep;
|
pkgconf_dependency_t *flattened_dep;
|
||||||
|
|
||||||
flattened_dep = pkgconf_dependency_copy(client, parent_dep);
|
flattened_dep = pkgconf_dependency_copy(client, node->data);
|
||||||
|
|
||||||
if ((client->flags & PKGCONF_PKG_PKGF_ITER_PKG_IS_PRIVATE) != PKGCONF_PKG_PKGF_ITER_PKG_IS_PRIVATE)
|
if ((client->flags & PKGCONF_PKG_PKGF_ITER_PKG_IS_PRIVATE) != PKGCONF_PKG_PKGF_ITER_PKG_IS_PRIVATE)
|
||||||
pkgconf_node_insert(&flattened_dep->iter, flattened_dep, &world->required);
|
pkgconf_node_insert(&flattened_dep->iter, flattened_dep, &world->required);
|
||||||
|
@ -128,10 +127,9 @@ pkgconf_queue_collect_dependents(pkgconf_client_t *client, pkgconf_pkg_t *pkg, v
|
||||||
{
|
{
|
||||||
PKGCONF_FOREACH_LIST_ENTRY(pkg->requires_private.head, node)
|
PKGCONF_FOREACH_LIST_ENTRY(pkg->requires_private.head, node)
|
||||||
{
|
{
|
||||||
pkgconf_dependency_t *parent_dep = node->data;
|
|
||||||
pkgconf_dependency_t *flattened_dep;
|
pkgconf_dependency_t *flattened_dep;
|
||||||
|
|
||||||
flattened_dep = pkgconf_dependency_copy(client, parent_dep);
|
flattened_dep = pkgconf_dependency_copy(client, node->data);
|
||||||
|
|
||||||
pkgconf_node_insert(&flattened_dep->iter, flattened_dep, &world->requires_private);
|
pkgconf_node_insert(&flattened_dep->iter, flattened_dep, &world->requires_private);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue