diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/lib/core/include/wheelinfo.h (renamed from src/lib/core/include/wheel.h) | 6 | ||||
| -rw-r--r-- | src/lib/core/wheelinfo.c (renamed from src/lib/core/wheel.c) | 18 | ||||
| -rw-r--r-- | src/lib/delivery/delivery_install.c | 6 | ||||
| -rw-r--r-- | src/lib/delivery/include/delivery.h | 2 |
5 files changed, 17 insertions, 17 deletions
diff --git a/src/lib/core/CMakeLists.txt b/src/lib/core/CMakeLists.txt index eb7a908..d264010 100644 --- a/src/lib/core/CMakeLists.txt +++ b/src/lib/core/CMakeLists.txt @@ -11,7 +11,7 @@ add_library(stasis_core STATIC download.c recipe.c relocation.c - wheel.c + wheelinfo.c copy.c artifactory.c template.c diff --git a/src/lib/core/include/wheel.h b/src/lib/core/include/wheelinfo.h index 1a689e9..8009e91 100644 --- a/src/lib/core/include/wheel.h +++ b/src/lib/core/include/wheelinfo.h @@ -9,7 +9,7 @@ #define WHEEL_MATCH_EXACT 0 ///< Match when all patterns are present #define WHEEL_MATCH_ANY 1 ///< Match when any patterns are present -struct Wheel { +struct WheelInfo { char *distribution; ///< Package name char *version; ///< Package version char *build_tag; ///< Package build tag (optional) @@ -31,6 +31,6 @@ struct Wheel { * @return pointer to populated Wheel on success * @return NULL on error */ -struct Wheel *get_wheel_info(const char *basepath, const char *name, char *to_match[], unsigned match_mode); -void wheel_free(struct Wheel **wheel); +struct WheelInfo *wheelinfo_get(const char *basepath, const char *name, char *to_match[], unsigned match_mode); +void wheelinfo_free(struct WheelInfo **wheel); #endif //STASIS_WHEEL_H diff --git a/src/lib/core/wheel.c b/src/lib/core/wheelinfo.c index c7e485a..d0e2484 100644 --- a/src/lib/core/wheel.c +++ b/src/lib/core/wheelinfo.c @@ -1,8 +1,8 @@ -#include "wheel.h" +#include "wheelinfo.h" -struct Wheel *get_wheel_info(const char *basepath, const char *name, char *to_match[], unsigned match_mode) { +struct WheelInfo *wheelinfo_get(const char *basepath, const char *name, char *to_match[], unsigned match_mode) { struct dirent *rec; - struct Wheel *result = NULL; + struct WheelInfo *result = NULL; char package_path[PATH_MAX]; char package_name[NAME_MAX]; @@ -55,14 +55,14 @@ struct Wheel *get_wheel_info(const char *basepath, const char *name, char *to_ma result->path_name = realpath(package_path, NULL); if (!result->path_name) { SYSERROR("Unable to resolve absolute path to %s: %s", filename, strerror(errno)); - wheel_free(&result); + wheelinfo_free(&result); closedir(dp); return NULL; } result->file_name = strdup(rec->d_name); if (!result->file_name) { SYSERROR("Unable to allocate bytes for %s: %s", rec->d_name, strerror(errno)); - wheel_free(&result); + wheelinfo_free(&result); closedir(dp); return NULL; } @@ -74,7 +74,7 @@ struct Wheel *get_wheel_info(const char *basepath, const char *name, char *to_ma // directory with a malformed file name, or we've managed to // exhaust the system's memory SYSERROR("%s has no '-' separators! (Delete this file and try again)", filename); - wheel_free(&result); + wheelinfo_free(&result); closedir(dp); return NULL; } @@ -100,7 +100,7 @@ struct Wheel *get_wheel_info(const char *basepath, const char *name, char *to_ma SYSERROR("Unknown wheel name format: %s. Expected 5 or 6 strings " "separated by '-', but got %zu instead", filename, parts_total); guard_array_free(parts); - wheel_free(&result); + wheelinfo_free(&result); closedir(dp); return NULL; } @@ -111,8 +111,8 @@ struct Wheel *get_wheel_info(const char *basepath, const char *name, char *to_ma return result; } -void wheel_free(struct Wheel **wheel) { - struct Wheel *w = (*wheel); +void wheelinfo_free(struct WheelInfo **wheel) { + struct WheelInfo *w = (*wheel); guard_free(w->path_name); guard_free(w->file_name); guard_free(w->distribution); diff --git a/src/lib/delivery/delivery_install.c b/src/lib/delivery/delivery_install.c index f1637a3..2d322de 100644 --- a/src/lib/delivery/delivery_install.c +++ b/src/lib/delivery/delivery_install.c @@ -252,7 +252,7 @@ int delivery_install_packages(struct Delivery *ctx, char *conda_install_dir, cha } strlist_append_tokenize(tag_data, info->repository_info_tag, "-"); - struct Wheel *whl = NULL; + struct WheelInfo *whl = NULL; char *post_commit = NULL; char *hash = NULL; if (strlist_count(tag_data) > 1) { @@ -264,7 +264,7 @@ int delivery_install_packages(struct Delivery *ctx, char *conda_install_dir, cha // equal to the tag; setuptools_scm auto-increments the value, the user can change it manually, // etc. errno = 0; - whl = get_wheel_info(ctx->storage.wheel_artifact_dir, info->name, + whl = wheelinfo_get(ctx->storage.wheel_artifact_dir, info->name, (char *[]) {ctx->meta.python_compact, ctx->system.arch, "none", "any", post_commit, hash, @@ -281,7 +281,7 @@ int delivery_install_packages(struct Delivery *ctx, char *conda_install_dir, cha info->version = strdup(whl->version); } guard_strlist_free(&tag_data); - wheel_free(&whl); + wheelinfo_free(&whl); } char req[255] = {0}; diff --git a/src/lib/delivery/include/delivery.h b/src/lib/delivery/include/delivery.h index cae4b02..ddc819e 100644 --- a/src/lib/delivery/include/delivery.h +++ b/src/lib/delivery/include/delivery.h @@ -18,7 +18,7 @@ #include "ini.h" #include "multiprocessing.h" #include "recipe.h" -#include "wheel.h" +#include "wheelinfo.h" #define DELIVERY_PLATFORM_MAX 4 #define DELIVERY_PLATFORM_MAXLEN 65 |
