[elbe-devel] [PATCH 3/4] Implement downloading pbuilder src-pkg

bage at linutronix.de bage at linutronix.de
Wed Jan 15 22:14:03 CET 2020


From: Bastian Germann <bage at linutronix.de>

`apt-get source` downloads the package and `dpkg-source` extracts it.

Signed-off-by: Bastian Germann <bage at linutronix.de>
---
 elbepack/elbeproject.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index bc32c25d0..1525aa0d0 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -418,8 +418,17 @@ class ElbeProject (object):
                 pass
         elif p.tag == 'svn':
             do("svn co --non-interactive %s %s" % (src_uri, src_path))
+        elif p.tag == 'src-pkg':
+            pdb_path = os.path.join(self.builddir, "pdebuilder")
+            os.mkdir(pdb_path)
+
+            oldcwd = os.getcwd()
+            os.chdir(pdb_path)
+            do("apt-get source --download-only %s" % src_uri)
+            do("dpkg-source -x *.dsc current")
+            os.chdir(oldcwd)
         else:
-            logging.info("Unknown pbuild source vcs: %s", p.tag)
+            logging.info("Unknown pbuild source: %s", p.tag)
 
         # pdebuild_build(-1) means use all cpus
         self.pdebuild_build(cpuset=-1, profile="")
-- 
2.20.1




More information about the elbe-devel mailing list