Files
ed1bee096b fix(containers): remove a backend's image from its former repository (#4223)
* fix(containers): remove a backend's image from its former repository

A container backend's version marker records only the tag and digest, so
after gufo:rocm moved from docker.io/kyuz0/amd-strix-halo-toolboxes to
ghcr.io/gufo-org/toolboxes/gufo-runtime (#4159), upgrading or uninstalling
an existing install tried to remove the old digest under the new
repository. Podman found no such image and the old 6.87 GB image stayed.

ContainerPolicy now lists former_images, and upgrade and uninstall remove
the installed digest under each repository where it exists.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(containers): count an image under a former repository as installed

is_recipe_installed() looked for the installed digest only under the
current repository, so a gufo:rocm install from before #4159 reported
installable instead of update_required, and the app hid Uninstall and
left it out of Update All.

get_present_installed_images() returns the installed images the container
tool holds, under the current or a former repository. The status check,
upgrade and uninstall all use it, so the has_image check lives in one
place. The test now covers the full candidate list, a missing marker, and
which candidates are present.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(containers): warn only when removing an image fails for a real reason

Upgrade and uninstall checked has_image() before each removal, which
returns false when Podman or Docker cannot answer as well as when the
image is missing, so a removal against a stopped daemon was skipped
without a warning.

remove_image() now treats Podman's "image not known" and Docker's "No
such image" as success, the way remove_network() treats a missing
network, and upgrade and uninstall call it for every name the install
could have. Any other failure still logs a warning.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: fl0rianr <[email protected]>
2026-11-22 20:02:47 +00:00
..