fix: update install example to work with the new resolve function

This commit is contained in:
ngn 2024-07-16 20:10:10 +03:00
parent d261d99422
commit 68a0951a9f
2 changed files with 5 additions and 4 deletions

View File

@ -53,7 +53,7 @@ int main(int argc, char *argv[]) {
printf("resolving package: %s (%s)...\n", pkg->name, pkg->version);
if ((list = lm_ctx_resolve(&ctx, pkg)) == NULL) {
if ((list = lm_ctx_resolve(&ctx, pkg, NULL)) == NULL) {
printf("failed to resolve package: %s (%d)\n", lm_strerror(), lm_error());
goto end;
}

View File

@ -68,9 +68,10 @@ void lm_ctx_free(lm_ctx_t *ctx);
/* ####################
## main fucntions ##
#################### */
lm_ctx_resolve_list_t *lm_ctx_resolve(lm_ctx_t *ctx, lm_pkg_t *pkg, lm_ctx_resolve_list_t *list); // resolves a package and returns a list of packages
lm_pkg_t *lm_ctx_resolve_next(lm_ctx_resolve_list_t *list); // returns the next package in the list
void lm_ctx_resolve_free(lm_ctx_resolve_list_t *list); // frees the resolved list returned by lm_ctx_resolve
lm_ctx_resolve_list_t *lm_ctx_resolve(
lm_ctx_t *ctx, lm_pkg_t *pkg, lm_ctx_resolve_list_t *list); // resolves a package and returns a list of packages
lm_pkg_t *lm_ctx_resolve_next(lm_ctx_resolve_list_t *list); // returns the next package in the list
void lm_ctx_resolve_free(lm_ctx_resolve_list_t *list); // frees the resolved list returned by lm_ctx_resolve
lm_ctx_update_list_t *lm_ctx_update_list(lm_ctx_t *ctx); // get a list of packages to update
lm_pkg_t *lm_ctx_update_list_next(lm_ctx_update_list_t *list); // get the next package in the update list