[elbe-devel] [PATCH V2] LOCALMACHINE support for pbuilder tag
Volker Haspel
volker.haspel at linutronix.de
Wed Jun 27 15:31:13 CEST 2018
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>
---
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
More information about the elbe-devel
mailing list