Cleanups, packages/cmd_check: ignore comments, cmd_build: add --force

Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
This commit is contained in:
InsanePrawn 2021-09-26 17:17:53 +02:00
parent 23ff0d50e0
commit 3594952a13
3 changed files with 22 additions and 16 deletions

View file

@ -78,14 +78,14 @@ def create_chroot_user(
):
chroot_path = get_chroot_path(chroot_name, override_basepath=chroot_base_path)
install_script = '\n'.join([
f'if ! id -u "{user}" >/dev/null 2>&1; then',
f' useradd -m {user}',
f'fi',
f'usermod -a -G {",".join(groups)} {user}',
f'echo "{user}:{password}" | chpasswd',
f'chown {user}:{user} /home/{user} -R',
])
install_script = f'''
if ! id -u "{user}" >/dev/null 2>&1; then
useradd -m {user}
fi
usermod -a -G {",".join(groups)} {user}
echo "{user}:{password}" | chpasswd
chown {user}:{user} /home/{user} -R
'''
result = subprocess.run([
'arch-chroot',
chroot_path,