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

Torben Hohn torben.hohn at linutronix.de
Wed Feb 10 13:01:29 CET 2021


On Mon, Jan 25, 2021 at 03:32:13PM +0100, Kory Maincent wrote:
> Add the host architecture to the reprepo configuration.
> It is needed when building package for host architecture.

Can you please describe the use case here ?
i dont understand, how host packages are built.

> 
> 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
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner


More information about the elbe-devel mailing list