[elbe-devel] [PATCH V2] LOCALMACHINE support for pbuilder tag

Kurt Kanzenbach kurt at linutronix.de
Wed Jun 27 16:14:24 CEST 2018


On Wed, Jun 27, 2018 at 03:31:13PM +0200, Volker Haspel wrote:
> There are people using local git or svn server on their build system.
> They should be able to specify 'LOCALMACHINE' in their XML files.
>
> The patch replaces the string 'LOCALMACHINE' with 10.0.2.2 in the source
> URI of the repository.
>
> Signed-off-by: Volker Haspel <volker.haspel at linutronix.de>

Reviewed-by: Kurt Kanzenbach <kurt at linutronix.de>

> ---
>  elbepack/elbeproject.py | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> index d3396b90..a4a3044c 100644
> --- a/elbepack/elbeproject.py
> +++ b/elbepack/elbeproject.py
> @@ -185,15 +185,16 @@ class ElbeProject (object):
>          self.pdebuild_init ()
>          src_path = os.path.join (self.builddir, "pdebuilder", "current")
>
> -        self.log.printo ("retrieve pbuild sources: %s" % p.text('.').strip())
> +        src_uri = p.text('.').replace("LOCALMACHINE", "10.0.2.2").strip()
> +        self.log.printo ("retrieve pbuild sources: %s" % src_uri)
>          if p.tag == 'git':
> -            self.log.do ("git clone %s %s" % (p.text('.').strip(), src_path))
> +            self.log.do ("git clone %s %s" % (src_uri, src_path))
>              try:
>                  self.log.do ("cd %s; git reset --hard %s" % (src_path, p.et.attrib['revision']))
>              except IndexError:
>                  pass
>          elif p.tag == 'svn':
> -            self.log.do ("svn co --non-interactive %s %s" % (p.text('.').strip(), src_path))
> +            self.log.do ("svn co --non-interactive %s %s" % (src_uri, src_path))
>          else:
>              self.log.printo ("unknown pbuild source vcs: %s" % p.tag)
>
> --
> 2.11.0
>
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel



More information about the elbe-devel mailing list