From a679b2da9543ad1d071a43caf9f646fbb2857c49 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 16 Nov 2022 17:48:35 +0100 Subject: containers: T2216: support re-install via dpkg of vyos-1x-smoketest package skopeo does not support overwriting an image - simply remove and readd it. --- debian/vyos-1x-smoketest.postinst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'debian/vyos-1x-smoketest.postinst') diff --git a/debian/vyos-1x-smoketest.postinst b/debian/vyos-1x-smoketest.postinst index b33376bc3..18612804c 100755 --- a/debian/vyos-1x-smoketest.postinst +++ b/debian/vyos-1x-smoketest.postinst @@ -1,6 +1,10 @@ #!/bin/sh -e BUSYBOX_TAG="docker.io/library/busybox:stable" -OUTPUT_PATH="docker-archive://usr/share/vyos/busybox-stable.tar" +OUTPUT_PATH="/usr/share/vyos/busybox-stable.tar" -skopeo copy --additional-tag "$BUSYBOX_TAG" "docker://$BUSYBOX_TAG" "$OUTPUT_PATH" +if [[ -f $OUTPUT_PATH ]]; then + rm -f $OUTPUT_PATH +fi + +skopeo copy --additional-tag "$BUSYBOX_TAG" "docker://$BUSYBOX_TAG" "docker-archive:/$OUTPUT_PATH" -- cgit v1.2.3