mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-02 01:18:08 +01:00
Allow use of base.tar.bz2 from previous build as early preseed
base.tar.bz2 will contain the "steps" and "external" subdirectories, which we later try to create - ensure that they are deleted when restoring an early preseed; this way base.tar.bz2 works without any modification as a preseed tarball
This commit is contained in:
parent
b02c35443f
commit
8884d79802
1 changed files with 6 additions and 2 deletions
|
|
@ -70,18 +70,22 @@ class Generator():
|
|||
self.target_dir = os.path.join(self.target_dir, 'disk')
|
||||
self.external_dir = os.path.join(self.target_dir, 'external')
|
||||
|
||||
os.makedirs(self.external_dir)
|
||||
|
||||
if self.early_preseed:
|
||||
# Extract tar containing preseed
|
||||
with tarfile.open(self.early_preseed, "r") as seed:
|
||||
seed.extractall(self.target_dir)
|
||||
if os.path.exists(os.path.join(self.target_dir, 'steps')):
|
||||
shutil.rmtree(os.path.join(self.target_dir, 'steps'))
|
||||
if os.path.exists(self.external_dir):
|
||||
shutil.rmtree(self.external_dir)
|
||||
shutil.copy2(os.path.join(self.git_dir, 'seed', 'preseeded.kaem'),
|
||||
os.path.join(self.target_dir, 'kaem.x86'))
|
||||
else:
|
||||
self.stage0_posix(kernel_bootstrap)
|
||||
self.seed()
|
||||
|
||||
os.makedirs(self.external_dir)
|
||||
|
||||
self.steps()
|
||||
|
||||
self.distfiles()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue