diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2023-11-20 08:49:43 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2023-11-20 08:49:43 -0500 |
commit | 601681d88387dddda70db8601a98cb89edea1d78 (patch) | |
tree | 2868f12cd952090d62600def59a1e512522b3495 /include | |
parent | b9576b9bddc5887d912643f7822d13df7140c84a (diff) | |
download | stasis-601681d88387dddda70db8601a98cb89edea1d78.tar.gz |
Implements slightly improved error handling
* Return status from conda_ and delivery_ functions
* Caller prints meaningful error, and handles it
* Enable warnings during compilation
* Squelch format-truncation warning -- those strings are extremely unlikely to overflow (famous last words)
Diffstat (limited to 'include')
-rw-r--r-- | include/conda.h | 8 | ||||
-rw-r--r-- | include/deliverable.h | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/include/conda.h b/include/conda.h index bc74b94..3565bda 100644 --- a/include/conda.h +++ b/include/conda.h @@ -16,9 +16,9 @@ int pip_exec(const char *args); int conda_exec(const char *args); int conda_activate(const char *root, const char *env_name); void conda_setup_headless(); -void conda_env_create_from_uri(char *name, char *uri); -void conda_env_create(char *name, char *python_version, char *packages); -void conda_env_remove(char *name); -void conda_env_export(char *name, char *output_dir, char *output_filename); +int conda_env_create_from_uri(char *name, char *uri); +int conda_env_create(char *name, char *python_version, char *packages); +int conda_env_remove(char *name); +int conda_env_export(char *name, char *output_dir, char *output_filename); int conda_index(const char *path); #endif //OMC_CONDA_H diff --git a/include/deliverable.h b/include/deliverable.h index 02c13e1..b585054 100644 --- a/include/deliverable.h +++ b/include/deliverable.h @@ -72,7 +72,6 @@ struct Delivery { char *mission; ///< hst, jwst, roman char *codename; ///< HST uses codenames bool final; ///< is this a final release? - bool continue_on_error; ///< keep going, or don't } meta; /*! \struct Info @@ -187,7 +186,7 @@ int delivery_index_wheel_artifacts(struct Delivery *ctx); * @return header on success * @return NULL on error */ -char *delivery_get_spec_header(struct Delivery *ctx); +char *delivery_get_release_header(struct Delivery *ctx); /** * Finalizes a delivery artifact for distribution @@ -216,7 +215,7 @@ int delivery_copy_conda_artifacts(struct Delivery *ctx); * Retrieve Conda installer * @param installer_url URL to installation script */ -void delivery_get_installer(char *installer_url); +int delivery_get_installer(char *installer_url); /** * Generate URL based on Delivery context @@ -237,7 +236,7 @@ void delivery_get_installer_url(struct Delivery *delivery, char *result); * @param type INSTALL_PKG_PIP_DEFERRED * @param manifest pointer to array of StrList (package list(s)) */ -void delivery_install_packages(struct Delivery *ctx, char *conda_install_dir, char *env_name, int type, struct StrList *manifest[]); +int delivery_install_packages(struct Delivery *ctx, char *conda_install_dir, char *env_name, int type, struct StrList *manifest[]); /** * Update "conda index" on Conda artifact storage |