Skip to content

Commit

Permalink
podman: wipe remaining files from the build root
Browse files Browse the repository at this point in the history
  • Loading branch information
dmach committed Sep 27, 2023
1 parent e662be2 commit 22cd2cd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build-vm-podman
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,11 @@ vm_sysrq_podman() {
vm_wipe_podman() {
local name="build_${RECIPEFILE}"
podman rm "$name" >/dev/null 2>&1 || true

echo "Wiping build root: '$BUILD_ROOT'"
unmount_build_root
# calling 'podman unshare' is required because podman creates the files with SubUIDs/SubGIDs
# that differ from user's UID/GID and removing them would normally end up with
# a permission error for any user that is not root
podman unshare rm -rf "$BUILD_ROOT"
}

0 comments on commit 22cd2cd

Please sign in to comment.