diff options
Diffstat (limited to 'src/lib/delivery')
| -rw-r--r-- | src/lib/delivery/delivery_install.c | 4 | ||||
| -rw-r--r-- | src/lib/delivery/include/delivery.h | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/delivery/delivery_install.c b/src/lib/delivery/delivery_install.c index d2e6a07..6ad9407 100644 --- a/src/lib/delivery/delivery_install.c +++ b/src/lib/delivery/delivery_install.c @@ -134,7 +134,7 @@ int delivery_overlay_packages_from_env(struct Delivery *ctx, const char *env_nam return 0; } -int delivery_conda_force_package_version(struct Delivery *ctx, const char *env_name, const char *name) { +int delivery_conda_enforce_package_version(struct Delivery *ctx, const char *env_name, const char *name) { char *spec_installed = NULL; char *spec_request = NULL; int status = 0; @@ -247,7 +247,7 @@ int delivery_conda_force_package_version(struct Delivery *ctx, const char *env_n } } - int stop = version_compare(NOT | EQ, spec_request, spec_installed); + const int stop = version_compare(NOT | EQ, spec_request, spec_installed); if (stop < 0) { SYSERROR("version comparison failed (spec_request: %s, spec_installed: %s)", spec_request, spec_installed); status = -1; diff --git a/src/lib/delivery/include/delivery.h b/src/lib/delivery/include/delivery.h index cff60a9..c091182 100644 --- a/src/lib/delivery/include/delivery.h +++ b/src/lib/delivery/include/delivery.h @@ -451,7 +451,15 @@ int delivery_exists(struct Delivery *ctx); int delivery_overlay_packages_from_env(struct Delivery *ctx, const char *env_name); -int delivery_conda_force_package_version(struct Delivery *ctx, const char *env_name, const char *name); +/** + * Conda does not handle version suffixes well, if at all. For example, if pkg-1.2.3rc1 is installed Conda will + * silently ignore a request to install pkg-1.2.3. This function serves as a workaround by comparing the version + * on-disk, and the requested version from the package list, and if the versions are not equal the on-disk package + * is replaced by the one in the package list. + * + * When a package is present in the list without a pinned version it will be reinstalled with whatever is available + */ +int delivery_conda_enforce_package_version(struct Delivery *ctx, const char *env_name, const char *name); /** * Retrieve remote deliveries associated with the current version series |
