From f8dd0f1abcf88767e0c71b28110e370cd5e9c173 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 4 May 2026 19:43:21 -0400 Subject: Include version_compare.h in delivery.h --- src/lib/delivery/include/delivery.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lib/delivery/include') diff --git a/src/lib/delivery/include/delivery.h b/src/lib/delivery/include/delivery.h index e524f4d..cff60a9 100644 --- a/src/lib/delivery/include/delivery.h +++ b/src/lib/delivery/include/delivery.h @@ -21,6 +21,7 @@ #include "wheel.h" #include "wheelinfo.h" #include "environment.h" +#include "version_compare.h" #define DELIVERY_PLATFORM_MAX 4 #define DELIVERY_PLATFORM_MAXLEN 65 @@ -450,6 +451,8 @@ 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); + /** * Retrieve remote deliveries associated with the current version series * @param ctx Delivery context -- cgit From 17bd286713df8f76f7b5f3878e501a81fa4c04ee Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 5 May 2026 13:45:58 -0400 Subject: Integrate into main and lib/delivery --- src/lib/delivery/include/delivery.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/lib/delivery/include') 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 -- cgit