[elbe-devel] [PATCH 2/3] pbuilder: support <raw-key> in pbuilder create

Torben Hohn torben.hohn at linutronix.de
Tue Jun 18 13:47:28 CEST 2019


<key> has been removed, and only exists in xml files, which have not
been preprocessed.

Feed the raw key text directly into the mirror setup script.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/pbuilder.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/elbepack/pbuilder.py b/elbepack/pbuilder.py
index 04684f11e..b38136de4 100644
--- a/elbepack/pbuilder.py
+++ b/elbepack/pbuilder.py
@@ -140,9 +140,9 @@ def pbuilder_write_repo_hook(builddir, xml):
                     mirror += 'echo "deb ' + noauth + \
                               url.text("binary").strip() + \
                               '" >> /etc/apt/sources.list\n'
-                if url.has("key") and not xml.prj.has("noauth"):
-                    key_url = url.text("key").strip()
-                    mirror = mirror_script_add_key(mirror, key_url)
+                if url.has("raw-key") and not xml.prj.has("noauth"):
+                    key = "\n".join(line.strip(" \t") for line in url.text('raw-key').splitlines()[1:-1])
+                    mirror = mirror_script_add_key_text(mirror, key)
 
     if xml.prj.has("mirror/cdrom"):
         mirror += 'echo "deb copy:///cdrom/targetrepo %s main added" >> ' \
-- 
2.11.0




More information about the elbe-devel mailing list