[elbe-devel] [PATCH 04/12] elbepack: rfs: make add_key return path of added key
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Mon Nov 18 15:45:21 CET 2024
From: Stefan Kempf <stefan at kempfsn.de>
[thomas: rebase, align with project conventions]
Signed-off-by: Stefan Kempf <stefan at kempfsn.de>
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/rfs.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/elbepack/rfs.py b/elbepack/rfs.py
index fd368ab90d7eae3b7a2126cd0eee98fd273dd976..afb57a424a424fc5c8b00060c5347dc9b4b4a6b1 100644
--- a/elbepack/rfs.py
+++ b/elbepack/rfs.py
@@ -271,9 +271,12 @@ class BuildEnv:
Adds the binary OpenPGP keyring 'key' as a trusted apt keyring
with file name 'keyname'.
"""
- with open(self.rfs.fname(f'/etc/apt/trusted.gpg.d/{keyname}'), 'wb') as outfile:
+ keyfile = self.rfs.fname(f'/etc/apt/trusted.gpg.d/{keyname}')
+ with open(keyfile, 'wb') as outfile:
outfile.write(key)
+ return keyfile
+
def import_keys(self):
if self.xml.has('project/mirror/url-list'):
# Should we use self.xml.prj.has("noauth")???
--
2.47.0
More information about the elbe-devel
mailing list