1*a3cefe7fSPierre Pronchery 2*a3cefe7fSPierre Proncherylibpkgconf `queue` module 3*a3cefe7fSPierre Pronchery========================= 4*a3cefe7fSPierre Pronchery 5*a3cefe7fSPierre ProncheryThe `queue` module provides an interface that allows easily building a dependency graph from an 6*a3cefe7fSPierre Proncheryarbitrary set of dependencies. It also provides support for doing "preflight" checks on the entire 7*a3cefe7fSPierre Proncherydependency graph prior to working with it. 8*a3cefe7fSPierre Pronchery 9*a3cefe7fSPierre ProncheryUsing the `queue` module functions is the recommended way of working with dependency graphs. 10*a3cefe7fSPierre Pronchery 11*a3cefe7fSPierre Pronchery.. c:function:: void pkgconf_queue_push(pkgconf_list_t *list, const char *package) 12*a3cefe7fSPierre Pronchery 13*a3cefe7fSPierre Pronchery Pushes a requested dependency onto the dependency resolver's queue. 14*a3cefe7fSPierre Pronchery 15*a3cefe7fSPierre Pronchery :param pkgconf_list_t* list: the dependency resolution queue to add the package request to. 16*a3cefe7fSPierre Pronchery :param char* package: the dependency atom requested 17*a3cefe7fSPierre Pronchery :return: nothing 18*a3cefe7fSPierre Pronchery 19*a3cefe7fSPierre Pronchery.. c:function:: bool pkgconf_queue_compile(pkgconf_client_t *client, pkgconf_pkg_t *world, pkgconf_list_t *list) 20*a3cefe7fSPierre Pronchery 21*a3cefe7fSPierre Pronchery Compile a dependency resolution queue into a dependency resolution problem if possible, otherwise report an error. 22*a3cefe7fSPierre Pronchery 23*a3cefe7fSPierre Pronchery :param pkgconf_client_t* client: The pkgconf client object to use for dependency resolution. 24*a3cefe7fSPierre Pronchery :param pkgconf_pkg_t* world: The designated root of the dependency graph. 25*a3cefe7fSPierre Pronchery :param pkgconf_list_t* list: The list of dependency requests to consider. 26*a3cefe7fSPierre Pronchery :return: true if the built dependency resolution problem is consistent, else false 27*a3cefe7fSPierre Pronchery :rtype: bool 28*a3cefe7fSPierre Pronchery 29*a3cefe7fSPierre Pronchery.. c:function:: void pkgconf_queue_free(pkgconf_list_t *list) 30*a3cefe7fSPierre Pronchery 31*a3cefe7fSPierre Pronchery Release any memory related to a dependency resolution queue. 32*a3cefe7fSPierre Pronchery 33*a3cefe7fSPierre Pronchery :param pkgconf_list_t* list: The dependency resolution queue to release. 34*a3cefe7fSPierre Pronchery :return: nothing 35*a3cefe7fSPierre Pronchery 36*a3cefe7fSPierre Pronchery.. c:function:: void pkgconf_solution_free(pkgconf_client_t *client, pkgconf_pkg_t *world, int maxdepth) 37*a3cefe7fSPierre Pronchery 38*a3cefe7fSPierre Pronchery Removes references to package nodes contained in a solution. 39*a3cefe7fSPierre Pronchery 40*a3cefe7fSPierre Pronchery :param pkgconf_client_t* client: The pkgconf client object to use for dependency resolution. 41*a3cefe7fSPierre Pronchery :param pkgconf_pkg_t* world: The root for the generated dependency graph. Should have PKGCONF_PKG_PROPF_VIRTUAL flag. 42*a3cefe7fSPierre Pronchery :returns: nothing 43*a3cefe7fSPierre Pronchery 44*a3cefe7fSPierre Pronchery.. c:function:: bool pkgconf_queue_solve(pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_pkg_t *world, int maxdepth) 45*a3cefe7fSPierre Pronchery 46*a3cefe7fSPierre Pronchery Solves and flattens the dependency graph for the supplied dependency list. 47*a3cefe7fSPierre Pronchery 48*a3cefe7fSPierre Pronchery :param pkgconf_client_t* client: The pkgconf client object to use for dependency resolution. 49*a3cefe7fSPierre Pronchery :param pkgconf_list_t* list: The list of dependency requests to consider. 50*a3cefe7fSPierre Pronchery :param pkgconf_pkg_t* world: The root for the generated dependency graph, provided by the caller. Should have PKGCONF_PKG_PROPF_VIRTUAL flag. 51*a3cefe7fSPierre Pronchery :param int maxdepth: The maximum allowed depth for the dependency resolver. A depth of -1 means unlimited. 52*a3cefe7fSPierre Pronchery :returns: true if the dependency resolver found a solution, otherwise false. 53*a3cefe7fSPierre Pronchery :rtype: bool 54*a3cefe7fSPierre Pronchery 55*a3cefe7fSPierre Pronchery.. c:function:: void pkgconf_queue_apply(pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_queue_apply_func_t func, int maxdepth, void *data) 56*a3cefe7fSPierre Pronchery 57*a3cefe7fSPierre Pronchery Attempt to compile a dependency resolution queue into a dependency resolution problem, then attempt to solve the problem and 58*a3cefe7fSPierre Pronchery feed the solution to a callback function if a complete dependency graph is found. 59*a3cefe7fSPierre Pronchery 60*a3cefe7fSPierre Pronchery This function should not be used in new code. Use pkgconf_queue_solve instead. 61*a3cefe7fSPierre Pronchery 62*a3cefe7fSPierre Pronchery :param pkgconf_client_t* client: The pkgconf client object to use for dependency resolution. 63*a3cefe7fSPierre Pronchery :param pkgconf_list_t* list: The list of dependency requests to consider. 64*a3cefe7fSPierre Pronchery :param pkgconf_queue_apply_func_t func: The callback function to call if a solution is found by the dependency resolver. 65*a3cefe7fSPierre Pronchery :param int maxdepth: The maximum allowed depth for the dependency resolver. A depth of -1 means unlimited. 66*a3cefe7fSPierre Pronchery :param void* data: An opaque pointer which is passed to the callback function. 67*a3cefe7fSPierre Pronchery :returns: true if the dependency resolver found a solution, otherwise false. 68*a3cefe7fSPierre Pronchery :rtype: bool 69*a3cefe7fSPierre Pronchery 70*a3cefe7fSPierre Pronchery.. c:function:: void pkgconf_queue_validate(pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_queue_apply_func_t func, int maxdepth, void *data) 71*a3cefe7fSPierre Pronchery 72*a3cefe7fSPierre Pronchery Attempt to compile a dependency resolution queue into a dependency resolution problem, then attempt to solve the problem. 73*a3cefe7fSPierre Pronchery 74*a3cefe7fSPierre Pronchery :param pkgconf_client_t* client: The pkgconf client object to use for dependency resolution. 75*a3cefe7fSPierre Pronchery :param pkgconf_list_t* list: The list of dependency requests to consider. 76*a3cefe7fSPierre Pronchery :param int maxdepth: The maximum allowed depth for the dependency resolver. A depth of -1 means unlimited. 77*a3cefe7fSPierre Pronchery :returns: true if the dependency resolver found a solution, otherwise false. 78*a3cefe7fSPierre Pronchery :rtype: bool 79