[elbe-devel] [PATCH] repomanager: Add host architecture to reprepro configure file.

Kory Maincent kory.maincent at bootlin.com
Mon Jan 25 15:32:13 CET 2021


Add the host architecture to the reprepo configuration.
It is needed when building package for host architecture.

Signed-off-by: Kory Maincent <kory.maincent at bootlin.com>
---
 elbepack/repomanager.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/elbepack/repomanager.py b/elbepack/repomanager.py
index 672ed1e6e..b46dfd055 100644
--- a/elbepack/repomanager.py
+++ b/elbepack/repomanager.py
@@ -16,7 +16,7 @@ from elbepack.debianreleases import codename2suite
 from elbepack.filesystem import Filesystem
 from elbepack.pkgutils import get_dsc_size
 from elbepack.egpg import generate_elbe_internal_key, export_key, unlock_key
-from elbepack.shellhelper import CommandError, do
+from elbepack.shellhelper import CommandError, do, get_command_out
 
 class RepoAttributes:
     def __init__(self, codename, arch, components,
@@ -115,6 +115,7 @@ class RepoBase:
         self.fs.mkdir_p("conf")
         fp = self.fs.open("conf/distributions", "w")
 
+        host_arch = get_command_out("dpkg --print-architecture").strip().decode()
         need_update = False
 
         for att in self.attrs:
@@ -122,7 +123,7 @@ class RepoBase:
             fp.write("Label: " + self.origin + "\n")
             fp.write("Suite: " + codename2suite[att.codename] + "\n")
             fp.write("Codename: " + att.codename + "\n")
-            fp.write("Architectures: " + " ".join(att.arch) + "\n")
+            fp.write("Architectures: " + " ".join(att.arch) + " " + host_arch + "\n")
             fp.write("Components: " + " ".join(att.components.difference(
                 set(["main/debian-installer"]))) + "\n")
             fp.write("UDebComponents: " + " ".join(att.components.difference(
-- 
2.17.1



More information about the elbe-devel mailing list