Fix image building

This commit is contained in:
jld3103 2021-10-08 15:22:02 +02:00
parent a8695f0095
commit 77ebd48eab
2 changed files with 9 additions and 4 deletions

View file

@ -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')

View file

@ -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: