spkenv / spk

A Package Manager for high velocity software environments, built on spfs.
https://spkenv.dev
Apache License 2.0
35 stars 5 forks source link

Have spk ls/search hide a version if the only available build is a /src build #1128

Open dcookspi opened 4 days ago

dcookspi commented 4 days ago

Is your feature request related to a problem? Please describe.

When people list the available versions of a package with the --host/--no-host options, e.g.

> spk ls --host python
3.10.8
3.9.7+r.1
3.9.7
3.7.7+r.1
2.7.11+r.1
2.7.0

versions that only have a /src build appear in the list. This is confusing for people because there isn't a built package for those versions available on the host's OS.

The /src builds make those versions show up because they bypass the host filtering mechanism because they have no baked build options.

Describe the solution you'd like Change the spk ls <package name> and spk search <partial package name> commands to hide a version if the only available build is a /src build on the OS. But also add a flag that re-enables the current behaviour and puts "(src only)" (or something) next to those versions in the output.

For example:

> spk ls --host python
3.9.7+r.1
3.9.7
3.7.7+r.1
2.7.11+r.1
2.7.0

> spk ls --host --include-src python
3.10.8  (/src only)
3.9.7+r.1
3.9.7 
3.7.7+r.1
2.7.11+r.1
2.7.0
jrray commented 4 days ago

Sounds good to me.

rydrman commented 4 days ago

From the meeting today: