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

Köry Maincent kory.maincent at bootlin.com
Wed Feb 10 14:41:06 CET 2021


Hello Torben,

On Wed, 10 Feb 2021 13:01:29 +0100
Torben Hohn <torben.hohn at linutronix.de> wrote:

> 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.

Sorry, my message was not so explicit.

The use case is:
If we cross-build a package for example qtbase for arm architecture.
All the qt libraries are built for arm and the tools like qmake are build
for host architecture.
Then if we cross-build another package that needs the qmake built before we
need to have access to host architecture packages in the local repository.
That is why I have added host architecture to the list of architectures in the
reprepro configuration file.

Regards,

> 
> > 
> > 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