containerd/platforms
Tianon Gravi 9072b09145 Refactor platforms.Only with a "platformVector" helper
This improves the hard-coded list of ARM fallbacks in the `platform.Only` implementation (by doing a descending loop over variant numbers instead, which is all the hard-coded list was doing).

Making this a separate function can then more easily be recursive later for handling an `arm64`->`arm` fallback (or similar), but I think it makes the code a lot more clear too (so we're calculating a vector of platforms separately from building a matcher object).

This also makes a minor adjustment in `TestImagePullWithDistSourceLabel` which had an implicit assumption that `platforms.Only` would only ever result in a single suitable manifest, which isn't strictly true (and is likely failing as-is when run on any 32bit `arm` system that's `v6` or higher, which this fixes 😅).

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2020-12-28 14:11:14 -08:00
..
compare_test.go Add platforms.Only test 2020-12-23 14:54:16 -08:00
compare.go Refactor platforms.Only with a "platformVector" helper 2020-12-28 14:11:14 -08:00
cpuinfo_test.go Licence header added 2018-02-19 10:32:26 +09:00
cpuinfo.go Add RPi1/RPi0 workaround 2020-09-04 14:19:37 -07:00
database.go Merge pull request #3624 from tklauser/platforms-update 2019-09-05 16:53:37 -07:00
defaults_test.go Add platform match comparer interface 2018-08-27 00:11:46 -07:00
defaults_unix.go Introduce the Windows lcow diff/snaphotter 2018-08-28 13:51:04 -07:00
defaults_windows.go Do not hardcode "amd64" on LCOW and Windows-related files 2020-11-09 13:39:07 -08:00
defaults.go Introduce the Windows lcow diff/snaphotter 2018-08-28 13:51:04 -07:00
platforms_test.go platforms: fill default arm variant when parse platform specifier 2020-01-08 13:35:49 +08:00
platforms.go platforms: fill default arm variant when parse platform specifier 2020-01-08 13:35:49 +08:00