Fix broken podman images filters

The id, digest, and intermediate filters were broken
for podman images. Fix to match on substrings instead of
the whole string for id and digest. Add the intermediate value
correctly when set.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
This commit is contained in:
Urvashi Mohnani
2023-09-28 12:11:12 -04:00
parent 87dd939334
commit ba788c1bb8
17 changed files with 157 additions and 30 deletions

View File

@@ -67,7 +67,7 @@ func createPruneFilterFuncs(key string, filterValues []string) (types.FilterFunc
}, nil
case "label!":
return func(net types.Network) bool {
return !filters.MatchLabelFilters(filterValues, net.Labels)
return filters.MatchNegatedLabelFilters(filterValues, net.Labels)
}, nil
case "until":
until, err := filters.ComputeUntilTimestamp(filterValues)