[elbe-devel] [PATCH 3/3] build-src-cdrom: reopen and update apt-cache
Manuel Traut
manut at linutronix.de
Thu Jul 12 16:20:09 CEST 2018
reopen and update apt-cache before building src cdrom is needed, because
the Buildenv may miss 'deb-src' in its sources.list if it was built with
--skip-build-sources. This is posible since building the cdroms can be
done seperately from building the target RFS.
Signed-off-by: Manuel Traut <manut at linutronix.de>
---
elbepack/cdroms.py | 2 +-
elbepack/elbeproject.py | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/elbepack/cdroms.py b/elbepack/cdroms.py
index 235b0698..a3d5e92f 100644
--- a/elbepack/cdroms.py
+++ b/elbepack/cdroms.py
@@ -47,7 +47,7 @@ def mk_source_cdrom(
mirror)
cache = get_rpcaptcache(rfs, "aptcache.log", arch)
-
+ cache.update()
pkglist = cache.get_installed_pkgs()
forbiddenPackages = []
diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index a50b47c2..9a29057d 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -364,6 +364,11 @@ class ElbeProject (object):
env = BuildEnv(self.xml, self.log, self.chrootpath,
build_sources=build_sources, clean=False)
+ # ensure the /etc/apt/sources.list is created according to buil_sources,
+ # build_bin flag, ensure to reopen it with the new 'sources.list'
+ env.seed_etc()
+ self.drop_rpcaptcache(env=env)
+
with env:
init_codename = self.xml.get_initvm_codename()
--
2.18.0
More information about the elbe-devel
mailing list