mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 05:35:44 -05:00
Fix image building
This commit is contained in:
parent
a8695f0095
commit
77ebd48eab
2 changed files with 9 additions and 4 deletions
|
@ -133,7 +133,7 @@ def create_chroot_user(
|
|||
install_script += f'echo "{user}:{password}" | chpasswd'
|
||||
else:
|
||||
install_script += 'echo "Set user password:" && passwd'
|
||||
result = run_chroot_cmd([install_script], chroot_path=chroot_path)
|
||||
result = run_chroot_cmd(install_script, chroot_path=chroot_path)
|
||||
if result.returncode != 0:
|
||||
raise Exception('Failed to setup user')
|
||||
|
||||
|
|
11
image.py
11
image.py
|
@ -161,7 +161,7 @@ def cmd_build():
|
|||
rootfs_mount = get_chroot_path(chroot_name)
|
||||
mount_rootfs_image(image_name, rootfs_mount)
|
||||
|
||||
packages_dir = config.get_packages(arch)
|
||||
packages_dir = config.get_package_dir(arch)
|
||||
if os.path.exists(os.path.join(packages_dir, 'main')):
|
||||
extra_repos = get_kupfer_local(arch).repos
|
||||
else:
|
||||
|
@ -169,12 +169,17 @@ def cmd_build():
|
|||
packages = ['base', 'base-kupfer'] + DEVICES[device] + FLAVOURS[flavour]['packages'] + profile['pkgs_include']
|
||||
create_chroot(
|
||||
chroot_name,
|
||||
arch=arch,
|
||||
packages=packages,
|
||||
pacman_conf=os.path.join(config.runtime['script_source_dir'], 'local/etc/pacman.conf'),
|
||||
extra_repos=extra_repos,
|
||||
bind_mounts={},
|
||||
chroot_base_path='/chroot',
|
||||
)
|
||||
create_chroot_user(
|
||||
rootfs_mount,
|
||||
user=profile['username'],
|
||||
password=profile['password'],
|
||||
)
|
||||
create_chroot_user(chroot_name, user=profile['username'], password=profile['password'])
|
||||
if post_cmds:
|
||||
result = run_chroot_cmd(' && '.join(post_cmds), chroot_name)
|
||||
if result.returncode != 0:
|
||||
|
|
Loading…
Add table
Reference in a new issue