[elbe-devel] [PATCH v2] repomanager: fix key unlock for existing repo

Manuel Traut manut at linutronix.de
Tue Apr 30 09:34:39 CEST 2019


the gnupg key should be unlocked by the repomanager constructor.
However "elbe prjrepo upload_pkg" fails with the following error:

--8<--
running cmd +reprepro --basedir
"/var/cache/elbe/e9c6c678-669b-4d6c-b822-d432e62a78ea/repo" export jessie+
------------------------------------------------------------------------------
gpgme gave error Pinentry:32870:  Inappropriate ioctl for device
ERROR: Could not finish exporting 'jessie'!
There have been errors!
------------------------------------------------------------------------------
Command failed with errorcode 251
--8<--

This is because the SignWith line in reprepos distribution configuration
was not parsed correctly.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/repomanager.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/repomanager.py b/elbepack/repomanager.py
index a1b4f500..c17dc70b 100644
--- a/elbepack/repomanager.py
+++ b/elbepack/repomanager.py
@@ -88,7 +88,7 @@ class RepoBase(object):
         # generate a new key and generate repository config
         if self.fs.isdir("/"):
             repo_conf = self.fs.read_file("conf/distributions")
-            for l in repo_conf:
+            for l in repo_conf.split('\n'):
                 if l.startswith("SignWith"):
                     self.keyid = l.split(" ")[1]
                     unlock_key(self.keyid)
-- 
2.20.1




More information about the elbe-devel mailing list