nanovms / ops

ops - build and run nanos unikernels
https://ops.city
MIT License
1.27k stars 132 forks source link

feat: add CPU Architecture for Package Search & List #1610

Closed galuszkak closed 5 months ago

galuszkak commented 5 months ago

Hey,

thanks for great project! Based on issues that I had in #1604 , I thought it would be good add CPU Arch column so it's more obvious what are those packages. Also there are scenarios that you could have both images locally in different architectures and ability to differentiate them is important. I also thought that behavior in list should be changed to show all arch by default, and to only filter them if someone adds --arch.

Let me know if this PR is acceptable and if would be acceptable to change pkg list behaviour.

eyberg commented 5 months ago

pkg list doesn't have an arch flag yet but pkg search does

I think we had defaulted to the user's real arch w/the option of showing others so as not to confuse anyone; there are other clients that call into ops but as long as the correct arch is coming through that should be fine

Also there are scenarios that you could have both images locally in different architectures and ability to differentiate them is important.

ops actually doesn't have support for packages w/same namespace/name/version but diff arch today (the repo does) - i have some work in a diff branch that i'm going to push soon to enable that

regardless - I don't see anything wrong w/this pr so will go ahead and merge