[elbe-devel] [PATCH 04/11] elbepack: virtapt: don't fail when creating trusted keyring

Thomas Weißschuh thomas.weissschuh at linutronix.de
Thu Aug 1 17:53:01 CEST 2024


The directory has been created before, make sure not to error out in
that case.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/virtapt.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/virtapt.py b/elbepack/virtapt.py
index cb2a08b9c5c0..7af9d141a2c7 100644
--- a/elbepack/virtapt.py
+++ b/elbepack/virtapt.py
@@ -188,7 +188,7 @@ class VirtApt:
         if os.path.exists('/etc/apt/trusted.gpg'):
             shutil.copyfile('/etc/apt/trusted.gpg', ring_path)
 
-        shutil.copytree('/etc/apt/trusted.gpg.d', ring_path + '.d')
+        shutil.copytree('/etc/apt/trusted.gpg.d', ring_path + '.d', dirs_exist_ok=True)
 
     def mark_install(self, pkgname):
         self.depcache.mark_install(self.cache[pkgname])

-- 
2.45.2



More information about the elbe-devel mailing list