-
Notifications
You must be signed in to change notification settings - Fork 168
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
Add support for virtual_specs
checks before installation
#809
Conversation
75874ec
to
b6c4233
Compare
I tried the
|
if operator == "ge": | ||
specs[spec.name]["min"] = str(version.matcher_vo) | ||
elif operator == "lt" and spec.name == "__osx": | ||
specs[spec.name]["before"] = str(version.matcher_vo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm still jet lagged, but is this used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, at https://github.com/conda/constructor/pull/809/files#diff-620cc606622328c2ee309e832c215dbf23da87df82a5b10bd09ced66c2f9b503R200 ('before' it's part of the XML attributes that key accepts)
constructor/header.sh
Outdated
#if linux and min_glibc_version | ||
min_glibc_version="__MIN_GLIBC_VERSION__" | ||
# ldd reports glibc in the last field of the first line | ||
system_glibc_version=$(ldd --version | awk 'NR==1{print $NF}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ldd
on an alpine docker image with glibc installed will have a different output. ldd
here would give musl version and not glibc. /lib64/ld-linux-x86-64.so.2 --version
might be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use https://github.com/Docker-Hub-frolvlad/docker-alpine-glibc if you want to test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Isuru! Added a workaround for musl systems. Invoking ld.so directly in CentOS does not work so I'll leave it with those two branches for now.
|
||
A list of virtual packages that must be satisfied at install time. Virtual | ||
packages must start with `__`. For example, `__osx>=11` or `__glibc>=2.24`. | ||
These specs are dry-run solved offline by the bundled `--conda-exe` binary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the condo exe compatible with a much lower bound than one would otherwise expect. Say 2.12 on Linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is seems that on Linux you use ldd but that on osx you use a dry run.
any way to also use shell commands on osx? I feel like that would be more robust to increases in minimum requirements in osx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amazing, thanks!
Description
Adds a new key
virtual_specs
.This key allows installers to run some solver checks before the installation proceeds. Meant to be used with minimum required versions for virtual packages like
__osx
or__glibc
. We need it because the solver only runs at installer build time, not on the target machine.We perform an offline dry-run just to check that the solver passes there. On PKG installers, we fast track the
__osx
checks so the native checks run as soon as possible.Checklist - did you ...
news
directory (using the template) for the next release's release notes?