summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-10-01 18:19:29 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-10-01 18:51:31 +0200
commit3880eac385f452aafed0735eabfeb3edbc830072 (patch)
tree15b5540d2cb5167ba888d8fee5469f30a493d1e9
parent8e15e5b3623c2ca1bd2bfa99fdb98dbba570c215 (diff)
downloadvendor_replicant-scripts-3880eac385f452aafed0735eabfeb3edbc830072.tar.gz
vendor_replicant-scripts-3880eac385f452aafed0735eabfeb3edbc830072.tar.bz2
vendor_replicant-scripts-3880eac385f452aafed0735eabfeb3edbc830072.zip
add_adb_root: Bootimage: cleanup temporary files after adding adb root
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rwxr-xr-ximages/add_adb_root/add_adb_root.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/images/add_adb_root/add_adb_root.py b/images/add_adb_root/add_adb_root.py
index 7fb41ce..02afaae 100755
--- a/images/add_adb_root/add_adb_root.py
+++ b/images/add_adb_root/add_adb_root.py
@@ -93,6 +93,11 @@ class Bootimage(object):
"--cmdline={}".format(self._metadata['cmdline']),
"-o", output_file_path)
+ # Don't fill up /tmp
+ for path in [self._config, self._kernel, self._ramdisk]:
+ os.unlink(path)
+ os.removedirs(self._tmpdir)
+
return output_file_path
def add_adb_root(self, output_file_path):