mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-22 02:56:31 +01:00
Support reusing existing directory for multipass bootstrapping
This commit is contained in:
parent
3fd101e70a
commit
9ed4ae9a59
1 changed files with 8 additions and 2 deletions
|
|
@ -32,6 +32,13 @@ class Generator():
|
||||||
self.tmp_dir = None
|
self.tmp_dir = None
|
||||||
self.external_dir = None
|
self.external_dir = None
|
||||||
|
|
||||||
|
def reuse(self, tmpdir):
|
||||||
|
"""
|
||||||
|
Reuse a previously prepared bwrap environment for further stages.
|
||||||
|
"""
|
||||||
|
self.tmp_dir = tmpdir.path
|
||||||
|
self.external_dir = os.path.join(self.tmp_dir, 'external')
|
||||||
|
|
||||||
def prepare(self, tmpdir, using_kernel=False, kernel_bootstrap=False, target_size=0):
|
def prepare(self, tmpdir, using_kernel=False, kernel_bootstrap=False, target_size=0):
|
||||||
"""
|
"""
|
||||||
Prepare basic media of live-bootstrap.
|
Prepare basic media of live-bootstrap.
|
||||||
|
|
@ -39,8 +46,7 @@ class Generator():
|
||||||
/ -- contains seed to allow steps to be built, containing custom
|
/ -- contains seed to allow steps to be built, containing custom
|
||||||
scripts and stage0-posix
|
scripts and stage0-posix
|
||||||
"""
|
"""
|
||||||
self.tmp_dir = tmpdir.path
|
self.reuse(tmpdir)
|
||||||
self.external_dir = os.path.join(self.tmp_dir, 'external')
|
|
||||||
|
|
||||||
# We use ext3 here; ext4 actually has a variety of extensions that
|
# We use ext3 here; ext4 actually has a variety of extensions that
|
||||||
# have been added with varying levels of recency
|
# have been added with varying levels of recency
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue