From 558f1be62d5a30329f3cb9cbe9c625de08279cc1 Mon Sep 17 00:00:00 2001 From: Jakob Naucke Date: Thu, 15 Jul 2021 12:22:21 +0200 Subject: [PATCH] snap: Remove QEMU before clone If you snap in an environment where you previously snapped, `git clone`ing QEMU will fail. Remove the checkout directory. Fixes: #2249 Signed-off-by: Jakob Naucke --- snap/snapcraft.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 247a681503..06876f2c20 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -270,6 +270,7 @@ parts: # download source qemu_dir=${SNAPCRAFT_STAGE}/qemu + rm -rf "${qemu_dir}" git clone --branch ${branch} --single-branch ${url} "${qemu_dir}" cd ${qemu_dir} [ -z "${commit}" ] || git checkout ${commit}