From: Michael Schroeder Date: Fri, 21 Jul 2023 11:53:46 +0000 (+0200) Subject: repo_conda: overwrite the package subdir with the info subdir if there is a conflict X-Git-Tag: 0.7.25~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86717630b78f015ed3e0d41aa299cdde532b9c6f;p=thirdparty%2Flibsolv.git repo_conda: overwrite the package subdir with the info subdir if there is a conflict This is what classic conda does, so we also need to do it. Fixes issue #529 --- diff --git a/ext/repo_conda.c b/ext/repo_conda.c index 9211cbea..356d3b11 100644 --- a/ext/repo_conda.c +++ b/ext/repo_conda.c @@ -314,8 +314,16 @@ parse_package(struct parsedata *pd, struct solv_jsonparser *jp, char *kfn, char /* if we have a global subdir make sure that it matches */ if (subdir && pd->subdir && strcmp(subdir, pd->subdir) != 0) { + /* we used to return an error here, but classic conda + * just overwrites the package subdir with the global + * subdir */ +#if 0 pd->error = "subdir mismatch"; return JP_ERROR; +#else + solv_free(subdir); + subdir = solv_strdup(pd->subdir); +#endif } if (fn || kfn)