zyedidia / eget

Easily install prebuilt binaries from GitHub.
MIT License
954 stars 39 forks source link

Ability to filter out matching candidates #40

Closed ngirard closed 2 years ago

ngirard commented 2 years ago

Consider the following scenario:

❯ eget --asset=deb --asset=amd64 sharkdp/fd
2 candidates found for asset chain: please select manually
(1) fd-musl_8.4.0_amd64.deb
(2) fd_8.4.0_amd64.deb
Enter selection number: 

Here, as often in the Rust ecosystem, the binaries come as either (1) statically linked to musl (fd-musl_8.4.0_amd64.deb) or (2) dynamically linked to glibc (fd_8.4.0_amd64.deb). By common practice, when nothing is specified within the asset name, the latter is implied.

Since I encountered problems with programs linked to musl in rare occasions, I wish to prefer programs dynamically linked to glibc, when available.

Hence, I wish there was such -x | --exclude option that would allow me to --exclude=musl and thus lead me to the desired asset.

dufferzafar commented 2 years ago

So, you essentially want an inverse of --asset, right? Where -a is used to find assets containing a string, -x would be used to find assets not containing a string. Interesting!

dufferzafar commented 2 years ago

This is offtopic, but I find it amusing that users can have totally opposite usecases, as I always try to download a static musl binary so I can run it on boxes with very old GLIBC. @ngirard What problems have you seen with musl linked programs?

ngirard commented 2 years ago

This is offtopic, but I find it amusing that users can have totally opposite usecase

:-)

What problems have you seen with musl linked programs?

I'm afraid I don't recall but they were blocking problems, either the program didn't start or misbehaved.

It's also generally agreed that musl leads to lower performance, although it's not my priority atm.

dufferzafar commented 2 years ago

I have seen apps with bad musl builds as well - where in the binary just doesn't run, I've always left that as bad compilation. See for eg. this issue

I didn't know about the musl allocator perf issues, but as you said, perf is not as critical as just being able to run the thing.

zyedidia commented 2 years ago

This is now support with ^ syntax. For example eget --asset=deb --asset=amd64 --asset=^musl sharkdp/fd