update: better debug logging for __lm_ctx_resolve

This commit is contained in:
ngn
2024-08-22 08:42:46 +03:00
parent 6d4a8c9f9e
commit 1160b4b6a9
3 changed files with 9 additions and 4 deletions

View File

@ -20,18 +20,23 @@ bool __lm_ctx_resolve_contains(lm_pkg_t *pkg, lm_ctx_resolve_list_t *list){
}
bool __lm_ctx_resolve(lm_ctx_t *ctx, lm_ctx_resolve_list_t *list, lm_pkg_t *pkg, bool resolve_depends){
if(__lm_ctx_resolve_contains(pkg, list))
if(__lm_ctx_resolve_contains(pkg, list)){
pdebug(__func__, "%s is already in the list, skipping", pkg->data.name);
return true;
}
if(NULL == list->packages)
list->packages = malloc(sizeof(lm_pkg_t *)*(++list->count));
else
list->packages = realloc(list->packages, sizeof(lm_pkg_t *)*(++list->count));
pdebug(__func__, "adding %s to the list", pkg->data.name);
list->packages[list->count-1] = pkg;
if(!resolve_depends || NULL == pkg->data.depends)
if(!resolve_depends || NULL == pkg->data.depends){
pdebug(__func__, "skipping depend resolve for %s", pkg->data.name);
return true;
}
lm_pkg_t *depend = NULL;