update: handle actual package updates outside of the library

This commit is contained in:
ngn
2024-07-18 19:25:35 +03:00
parent 17d572add0
commit bc79c642ac
7 changed files with 60 additions and 52 deletions

View File

@ -63,9 +63,15 @@ bool lm_package_is_same(lm_pkg_t *one, lm_pkg_t *two){
bool lm_package_copy(lm_pkg_t *dst, lm_pkg_t *src){
lm_package_init(dst);
dst->name = strdup(src->name);
dst->version = strdup(src->version);
dst->desc = strdup(src->desc);
if(NULL != src->name)
dst->name = strdup(src->name);
if(NULL != src->version)
dst->version = strdup(src->version);
if(NULL != src->desc)
dst->desc = strdup(src->desc);
dst->size = src->size;
dst->pool = src->pool;

View File

@ -45,8 +45,12 @@ bool lm_package_path_copy(lm_pkg_t *dst, lm_pkg_t *src){
return false;
}
dst->paths.archive = strdup(src->paths.archive);
dst->paths.signature = strdup(src->paths.signature);
if(NULL != src->paths.archive)
dst->paths.archive = strdup(src->paths.archive);
if(NULL != src->paths.signature)
dst->paths.signature = strdup(src->paths.signature);
return true;
}