From 441d408aee6657debedddf81924981dd19e7bd57 Mon Sep 17 00:00:00 2001 From: Gianluca Zuccarelli Date: Fri, 3 May 2024 12:36:52 +0100 Subject: [PATCH] bib: deprecate the `--local` flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pulling container images before building would break in the case of authenticated images on podman machine, since the auth file lives on the host and not podman machine and won't know about it. This commit deprecates the `--local` flag and warns users when it is passed to the CLI so that this won't break things for anyone who might already be using the flag. This change means that the user will have to ensure that the container is pulled to the local container store before initiating the build. Co-authored-by: Ondřej Budai --- bib/internal/setup/setup.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bib/internal/setup/setup.go b/bib/internal/setup/setup.go index 66d068c..27009a5 100644 --- a/bib/internal/setup/setup.go +++ b/bib/internal/setup/setup.go @@ -153,7 +153,9 @@ func validateCanRunTargetArch(targetArch string) error { func ValidateHasContainerTags(imgref string) error { output, err := exec.Command("podman", "image", "inspect", imgref, "--format", "{{.Labels}}").Output() if err != nil { - return fmt.Errorf("failed inspect image: %w", util.OutputErr(err)) + return fmt.Errorf(`failed to inspect the image: %w +bootc-image-builder no longer pulls images, make sure to pull it before running bootc-image-builder: + sudo podman pull %s`, util.OutputErr(err), imgref) } tags := string(output)