[elbe-devel] [PATCH 03/11] elbepack: virtapt: clean up temporary directory
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Thu Aug 1 17:53:00 CEST 2024
Make sure the temporary directory is properly cleaned up.
A better way would be to use a contextmanager but that would be a bigger
change.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/commands/check_updates.py | 2 ++
elbepack/virtapt.py | 3 +++
2 files changed, 5 insertions(+)
diff --git a/elbepack/commands/check_updates.py b/elbepack/commands/check_updates.py
index c5f92ba7f315..598b585906a1 100644
--- a/elbepack/commands/check_updates.py
+++ b/elbepack/commands/check_updates.py
@@ -123,3 +123,5 @@ def run_command(argv):
subprocess.run([args.script, 'UPDATE', args.source_xmlfile])
else:
print('No Updates available')
+
+ v.delete()
diff --git a/elbepack/virtapt.py b/elbepack/virtapt.py
index 0dca4b5ee1dd..cb2a08b9c5c0 100644
--- a/elbepack/virtapt.py
+++ b/elbepack/virtapt.py
@@ -278,3 +278,6 @@ class VirtApt:
togo.append(p)
return list(set(deps))
+
+ def delete(self):
+ self.basefs.delete()
--
2.45.2
More information about the elbe-devel
mailing list