forked from Mirror/pmbootstrap
chroot: require explicit initialisation (MR 2252)
We currently lazily initialize the chroot's on first use, plus a few bonus calls to init. However, there are some instances where we actually don't want the chroot to be initialised (mostly to break recursion loops). Simplify the codebase by removing all of this, and just calling pmb.chroot.init() where it's needed. In addition, print a warning if init() is called multiple times for one chroot. This should help us catch these instances if they crop up again. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
22f805a325
commit
1d9bbd613e
11 changed files with 21 additions and 21 deletions
|
@ -11,6 +11,7 @@ import pmb.aportgen
|
|||
import pmb.build
|
||||
import pmb.build.autodetect
|
||||
import pmb.chroot
|
||||
import pmb.chroot.apk
|
||||
import pmb.chroot.initfs
|
||||
import pmb.chroot.other
|
||||
import pmb.ci
|
||||
|
@ -172,6 +173,8 @@ def chroot(args: PmbArgs):
|
|||
if args.add:
|
||||
pmb.chroot.apk.install(args, args.add.split(","), suffix)
|
||||
|
||||
pmb.chroot.init(args, suffix)
|
||||
|
||||
# Xauthority
|
||||
env = {}
|
||||
if args.xauth:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue