new: full implementation of remove and install functions

This commit is contained in:
ngn
2024-07-10 16:39:05 +03:00
parent d0dce209fa
commit f886bc08e4
30 changed files with 129 additions and 72 deletions

View File

@ -124,3 +124,18 @@ bool lm_package_depend_fromstr(lm_pkg_t *pkg, char *buffer){
return true;
}
bool lm_package_depends(lm_pkg_t *pkg, char *dep){
if(NULL == pkg || NULL == dep){
lm_error_set(LM_ERR_ArgNULL);
return false;
}
if(NULL == pkg->depends)
return false;
for(int i = 0; pkg->depends[i] != NULL; i++)
if(eq(pkg->depends[i], dep))
return true;
return false;
}