Skip to content

Commit

Permalink
copy snapd system from live layer to target system ourselves if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mwhudson committed Nov 25, 2024
1 parent 764d202 commit e092b0d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions subiquity/server/controllers/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,20 @@ async def run_curtin_step(name, stages, step_config, source=None):
}
),
)
seed_dir = "var/lib/snapd/seed"
live_seed_dir = "/" + seed_dir
target_seed_dir = self.tpath(seed_dir)
info = fs_controller._info
if not os.path.isdir(os.path.join(target_seed_dir, "systems", info.label)):
for dir in "snaps", "systems":
await self.app.command_runner.run(
[
"cp",
"-naT",
os.path.join(live_seed_dir, dir),
os.path.join(target_seed_dir, dir),
]
)
await fs_controller.finish_install(context=context)
await self.setup_target(context=context)
else:
Expand Down

0 comments on commit e092b0d

Please sign in to comment.