[elbe-devel] [PATCH] pkgutils: fix the LOCALMACHINE replace for in initvm code

Torben Hohn torben.hohn at linutronix.de
Tue Apr 9 16:30:05 CEST 2019


On Tue, Apr 09, 2019 at 04:23:47PM +0200, John Ogness wrote:
> On 2019-04-09, Torben Hohn <torben.hohn at linutronix.de> wrote:
> > pkgutils was used for elbe-bootstrap downloading code, which
> > runs outside of initvm. elbe-bootstrap has been removed, and different
> > code is used to download the debian installer nowadays.
> >
> > The code in pkgutils is only used by the host sdk downloading code.
> > This code runs inside the initvm and needs to replace LOCALMACHINE
> > with 10.0.2.2
> >
> > Fit it.
> >
> > Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
> 
> Reviewed-by: John Ogness <john.ogness at linutronix.de>

thanks for the review... 

> 
> > ---
> >  elbepack/pkgutils.py | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/elbepack/pkgutils.py b/elbepack/pkgutils.py
> > index 6cb0c85e..a5355863 100644
> > --- a/elbepack/pkgutils.py
> > +++ b/elbepack/pkgutils.py
> > @@ -27,7 +27,7 @@ def get_sources_list(prj):
> >      if prj.has("mirror/primary_host"):
> >          mirror = "%s://%s/%s" % (prj.text("mirror/primary_proto"),
> >                                   prj.text("mirror/primary_host").replace(
> > -            "LOCALMACHINE", "localhost"),
> > +            "LOCALMACHINE", "10.0.2.2"),
> >              prj.text("mirror/primary_path"))
> >          slist += "deb %s %s main\n" % (mirror, suite)
> >          slist += "deb-src %s %s main\n" % (mirror, suite)
> > @@ -35,10 +35,10 @@ def get_sources_list(prj):
> >      if prj.node("mirror/url-list"):
> >          for n in prj.node("mirror/url-list"):
> >              if n.has("binary"):
> > -                tmp = n.text("binary").replace("LOCALMACHINE", "localhost")
> > +                tmp = n.text("binary").replace("LOCALMACHINE", "10.0.2.2")
> >                  slist += "deb %s\n" % tmp.strip()
> >              if n.has("source"):
> > -                tmp = n.text("source").replace("LOCALMACHINE", "localhost")
> > +                tmp = n.text("source").replace("LOCALMACHINE", "10.0.2.2")
> >                  slist += "deb-src %s\n" % tmp.strip()
> >  
> >      return slist
> > @@ -49,7 +49,7 @@ def get_key_list(prj):
> >      if prj.node("mirror/url-list"):
> >          for n in prj.node("mirror/url-list"):
> >              if n.has("key"):
> > -                tmp = n.text("key").replace("LOCALMACHINE", "localhost")
> > +                tmp = n.text("key").replace("LOCALMACHINE", "10.0.2.2")
> >                  retval.append(tmp.strip())
> >  
> >      return retval

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20190409/109e59b9/attachment.sig>


More information about the elbe-devel mailing list