When the --chroot option is used rootfs.py attempts get the path to the chroot binary by running a small python3 script.
But the new run_as_root helper does not return the process object and so attempting to access stdout of the python3 process fails.
$ ./rootfs.py --chroot
Bootstrapping x86 -- SysA
subprocess.run(['sudo', 'python3', '-c', "\nimport shutil\nprint(shutil.which('chroot'))\n"], check=True, {'capture_output': True}
CompletedProcess(args=['sudo', 'python3', '-c', "\nimport shutil\nprint(shutil.which('chroot'))\n"], returncode=0, stdout=b'/usr/sbin/chroot\n', stderr=b'')
Traceback (most recent call last):
File "./rootfs.py", line 268, in <module>
main()
File "./rootfs.py", line 161, in main
bootstrap(args, system_a, system_c, tmpdir)
File "./rootfs.py", line 171, in bootstrap
chroot_binary = run_as_root('python3', '-c', find_chroot,
AttributeError: 'NoneType' object has no attribute 'stdout'
When the --chroot option is used rootfs.py attempts get the path to the chroot binary by running a small python3 script. But the new run_as_root helper does not return the process object and so attempting to access stdout of the python3 process fails.