From f2340ebcd418045caea105b4d78cdbe0129ba643 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Mon, 22 Jan 2018 22:35:07 +0000 Subject: [PATCH] Odin export: make sure temp folder is empty (#1141) --- pmb/export/odin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pmb/export/odin.py b/pmb/export/odin.py index aa9f5bc9..a0fce30f 100644 --- a/pmb/export/odin.py +++ b/pmb/export/odin.py @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with pmbootstrap. If not, see . """ import logging +import os import pmb.build import pmb.chroot.apk @@ -46,6 +47,8 @@ def odin(args, flavor, folder): # Temporary folder temp_folder = "/tmp/odin-flashable-tar" + if os.path.exists(args.work + "/chroot_native" + temp_folder): + pmb.chroot.root(args, ["rm", "-rf", temp_folder]) # Odin flashable tar generation script (because redirecting stdin/stdout is not allowed # in pmbootstrap's chroot/shell functions for security reasons)