From 11a599be9722ddb2aeb01e86b25a7ab802a01a4a Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Thu, 7 Nov 2024 12:48:29 +0100 Subject: [PATCH] Improve error message if skopeo is not installed --- build-recipe-kiwi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build-recipe-kiwi b/build-recipe-kiwi index 7b4532dd..d45ba0ad 100644 --- a/build-recipe-kiwi +++ b/build-recipe-kiwi @@ -819,15 +819,16 @@ kiwi_setup_extracontainers() { if test -z "$extracontainers" ; then return fi + test -x /usr/bin/skopeo || cleanup_and_exit 1 "need skopeo for container conversion" extracontainers=" $extracontainers " local c t d for c in $(find . -name \*.tar -print -o -name \*.tar.gz -print) ; do - for t in $(skopeo list-tags "docker-archive:$c" | sed -n -e 's/.*"\(.*\)".*/\1/' -e '/:/p') ; do + for t in $(/usr/bin/skopeo list-tags "docker-archive:$c" | sed -n -e 's/.*"\(.*\)".*/\1/' -e '/:/p') ; do if test "$extracontainers" != "${extracontainers/ $t }" ; then - skopeo copy "docker-archive:$c" "oci-archive:_tmp_oci:$t" + /usr/bin/skopeo copy "docker-archive:$c" "oci-archive:_tmp_oci:$t" test -f _tmp_oci || cleanup_and_exit 1 "oci-archive creation failed for $c" d="/$t" - mkdir -p "_obsrepositories${d%/*}" # bah! kiwi is weird + mkdir -p "_obsrepositories${d%/*}" # kiwi is weird mv _tmp_oci "_obsrepositories$d" echo "created oci-archive container _obsrepositories$d" fi