[elbe-devel] [PATCH 3/5] elbepack: elbeproject: activate buildenv before chroot apt-get

Thomas Weißschuh thomas.weissschuh at linutronix.de
Thu Aug 22 10:09:45 CEST 2024


The chroot needs a working network setup.
Ensure this by activating the build environment and its excursions.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/elbeproject.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 5a62d0bfcb73..eccfe5fce0d8 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -427,8 +427,10 @@ class ElbeProject:
             apt_args = ['--yes', '-q', '--download-only']
             if self.xml.prj.has('noauth'):
                 apt_args.append('--allow-unauthenticated')
-            chroot(self.chrootpath, ['/usr/bin/apt-get', 'update'])
-            chroot(self.chrootpath, ['/usr/bin/apt-get', 'source', *apt_args, src_uri])
+
+            with self.buildenv:
+                chroot(self.chrootpath, ['/usr/bin/apt-get', 'update'])
+                chroot(self.chrootpath, ['/usr/bin/apt-get', 'source', *apt_args, src_uri])
 
             do(f'dpkg-source -x {self.chrootpath}/*.dsc "{src_path}"; rm {self.chrootpath}/*.dsc')
         else:

-- 
2.46.0



More information about the elbe-devel mailing list