-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refine MatchSpec
validation to avoid incompatibilities with libmamba's parser
#421
Conversation
Failing as expected. Submitting fix now. |
Would this also fix the error
assuming that "md5" would/could be dropped, too? This was while trying to install another unrelated package. _libgcc_mutex shows as _libgcc_mutex 0.1 conda_forge conda-forge and was originally installed through a lockfile (which is where I suspect md5 comes from). |
Hm, maybe not (yet). We are only dropping the url field. Can you open a new issue so we can take a look? It's weird that the md5 hash ends up in the matchspec. |
new issue opened at #427 |
May I ask whether this fix is included in the latest version? I have updated conda to v24.9.2 as suggested in https://conda.github.io/conda-libmamba-solver/user-guide/#how-to-install but still got this error
|
What's your |
Thanks for the reply. I tried Could you elaborate a little bit about how to use it directly? I installed the |
Try to upgrade to conda-libmamba-solver 24.9 first, which should contain this fix. If that doesn't work, report back. |
That's it! Many thanks. |
Description
Closes #418
We were a bit too strict with some auto-generated
MatchSpec
. The issue above includes an environment where a user has installed a package via URL or path. In this case,conda
generates aMatchSpec
object that gets rendered aspackage-name[url="package-url"]
.libmamba only supports some key values in the brackets, so we were rejecting
url
with aInvalidSpecError
. However,url
here is superfluous so we can simply drop it from the passed string.This uncovered a new matchspec that makes libmamba segfault:
<unknown>/noarch::test-package
. We will also anticipate that and drop it before the string is generated because, again, it doesn't add any useful info for the solver and it's only an artifact of not knowing from which channel test-package was installed (because it came from a URL).Note that if the URL happens to be a channel URL (e.g.
conda.anaconda.org/conda-forge/noarch/package-version-build.tar.bz2
),conda
DOES recognize it as a valid channel and that doesn't crash. It only reproduces if the tarball is in a non-channel-like location.Checklist - did you ...
news
directory (using the template) for the next release's release notes?