new: full implementation of remove and install functions
This commit is contained in:
@ -63,13 +63,12 @@ void lm_ctx_free(lm_ctx_t *ctx);
|
||||
#################### */
|
||||
lm_ctx_resolve_list_t *lm_ctx_resolve(
|
||||
lm_ctx_t *ctx, lm_pkg_t *pkg); // resolves a package and returns a list of packages to install
|
||||
lm_pkg_t *lm_ctx_resolve_next(lm_ctx_t *ctx, lm_ctx_resolve_list_t *list); // returns the next package in the list
|
||||
void lm_ctx_resolve_free(
|
||||
lm_ctx_t *ctx, lm_ctx_resolve_list_t *list); // frees the resolved list returned by lm_ctx_resolve
|
||||
lm_pkg_t *lm_ctx_resolve_next(lm_ctx_resolve_list_t *list); // returns the next package in the list
|
||||
void lm_ctx_resolve_free(lm_ctx_resolve_list_t *list); // frees the resolved list returned by lm_ctx_resolve
|
||||
|
||||
lm_ctx_update_list_t *lm_ctx_update(lm_ctx_t *ctx); // returns a list of packages to update
|
||||
lm_pkg_t *lm_ctx_update_next(lm_ctx_t *ctx, lm_ctx_update_list_t *list); // returns the next package in the list
|
||||
void lm_ctx_update_free(lm_ctx_t *ctx, lm_ctx_update_list_t *list); // frees the update list returned by lm_ctx_update
|
||||
lm_ctx_update_list_t *lm_ctx_update(lm_ctx_t *ctx); // returns a list of packages to update
|
||||
lm_pkg_t *lm_ctx_update_next(lm_ctx_update_list_t *list); // returns the next package in the list
|
||||
void lm_ctx_update_free(lm_ctx_update_list_t *list); // frees the update list returned by lm_ctx_update
|
||||
|
||||
bool lm_ctx_download(lm_ctx_t *ctx, lm_pkg_t *pkg, lm_ctx_download_callback_t callback,
|
||||
void *data); // downloads a single package
|
||||
|
@ -132,6 +132,7 @@ typedef enum lm_error {
|
||||
LM_ERR_InstallBackChdirFail = 124,
|
||||
LM_ERR_InstallStatusFail = 125,
|
||||
LM_ERR_InstallScriptFail = 126,
|
||||
LM_ERR_PkgBreaks = 127,
|
||||
} lm_error_t;
|
||||
|
||||
typedef struct lm_error_desc {
|
||||
|
@ -23,6 +23,7 @@ size_t lm_package_depend_strlen(lm_pkg_t *pkg);
|
||||
bool lm_package_depend_tostr(lm_pkg_t *pkg, char *buffer);
|
||||
bool lm_package_depend_fromstr(lm_pkg_t *pkg, char *buffer);
|
||||
void lm_package_depend_free(lm_pkg_t *pkg);
|
||||
bool lm_package_depends(lm_pkg_t *pkg, char *dep);
|
||||
|
||||
size_t lm_package_keep_count(lm_pkg_t *pkg);
|
||||
bool lm_package_keep_add(lm_pkg_t *pkg, char *path);
|
||||
|
@ -40,5 +40,6 @@ char *join_alloc(const char *base, const char *pth);
|
||||
|
||||
bool pkglist_contains(lm_pkg_t *list, lm_pkg_t *pkg);
|
||||
lm_pkg_t *pkglist_del(lm_pkg_t *list, lm_pkg_t *pkg);
|
||||
lm_pkg_t *pkglist_add(lm_pkg_t *list, lm_pkg_t *pkg);
|
||||
lm_pkg_t *pkglist_add_top(lm_pkg_t *list, lm_pkg_t *pkg);
|
||||
lm_pkg_t *pkglist_add_end(lm_pkg_t *list, lm_pkg_t *pkg);
|
||||
void pkglist_free(lm_pkg_t *list);
|
||||
|
Reference in New Issue
Block a user