new: full implementation of remove and install functions
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user