mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-22 05:47:35 +00:00
ImageEngine.Prune split each --filter on every '=' and kept everything after the first as separate values, so a filter whose value itself contains '=' was torn apart. podman-image-prune.1.md documents label=key=value and gives '--filter label=version=1.0' as an example, which produced filters["label"] = ["version", "1.0"] instead of ["version=1.0"]. libimage turns every element into its own label filter and MatchLabelFilters cuts each one on '=' itself, so the request became 'has a label key version' AND 'has a label key 1.0'. Nothing carries a key named 1.0, so the prune matched no images and silently removed nothing. Local podman is unaffected: the abi path passes opts.Filter through untouched. This is remote-only, and it diverges from both siblings -- List uses SplitN(filter, "=", 2) and Events validates then rejoins with strings.Join. Prune now mirrors List. The existing e2e case only used 'label=abc', a bare key, which survives the old split by accident; added one that uses a key=value label and checks the non-matching image is still there afterwards. Signed-off-by: Atishyy27 <sethatishayjain@gmail.com> |
||
|---|---|---|
| .. | ||
| entities | ||
| filters | ||
| infra | ||
| utils | ||