containerd/platforms
Sebastiaan van Stijn bec6e4dd67
platforms.Normalize(): do not reset OSVersion and OSFeatures
Commit fb0688362c implemented the Normalize()
function, but marked these fields as deprecated.

It's unclear what the motivation was for this, as the fields are part of the OCI
Image spec. On Windows, the OSVersion field specifically is important when matching
images (as kernel versions may not be compatible).

This patch updates platforms.Normalize() to preserve the OSVersion and OSFeatures
fields.

As a follow-up, we should look at defining an appropriate string-representation
for these fields (possibly as part of the OCI Spec), and update platforms.Parse()
accordingly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-01 17:19:28 +01:00
..
compare_test.go platforms: add support for matching amd64 variants 2022-01-18 20:13:37 -08:00
compare.go platforms: add support for matching amd64 variants 2022-01-18 20:13:37 -08:00
cpuinfo_test.go Licence header added 2018-02-19 10:32:26 +09:00
cpuinfo.go feat: replace github.com/pkg/errors to errors 2022-01-07 10:27:03 +08:00
database.go Merge pull request #6455 from tonistiigi/amd64-variants 2022-01-27 10:07:49 -05:00
defaults_darwin.go run gofmt with Go 1.17 2021-10-07 20:16:59 +08:00
defaults_unix_test.go windows: The DefaultSpec platform should match the Default matcher 2021-08-26 16:01:21 +00:00
defaults_unix.go darwin: runtime support 2021-09-03 09:48:21 +09:00
defaults_windows_test.go Add Windows Server 2022 CI runs 2021-12-02 16:18:25 -08:00
defaults_windows.go windows: The DefaultSpec platform should match the Default matcher 2021-08-26 16:01:21 +00:00
defaults.go windows: The DefaultSpec platform should match the Default matcher 2021-08-26 16:01:21 +00:00
platforms_test.go platforms.Normalize(): do not reset OSVersion and OSFeatures 2022-02-01 17:19:28 +01:00
platforms.go platforms.Normalize(): do not reset OSVersion and OSFeatures 2022-02-01 17:19:28 +01:00