new: add callback for serve command

This commit is contained in:
ngn
2024-07-17 21:31:25 +03:00
parent 68a0951a9f
commit 7532c0d682
9 changed files with 59 additions and 52 deletions

View File

@ -44,6 +44,11 @@ int main(int argc, char *argv[]) {
goto end;
}
if (!lm_ctx_removeable(&ctx, &pkg)) {
printf("cannot remove package: %s (%d)", lm_strerror(), lm_error());
goto end;
}
printf("removing package: %s (%s)...\n", pkg.name, pkg.version);
if (!lm_ctx_remove(&ctx, &pkg, NULL, NULL)) {