pmaports CI cannot run losetup
I suspect this is from 0975d064 (cc @Newbyte ), but pmb is unable to run losetup now in the pmaports CI:
(000139) [00:23:59] (native) % losetup --json --list
chroot: cannot change root directory to '/home/pmos/.local/var/pmbootstrap/chroot_native': No such file or directory
detailed output from pmb in pmaports CI
(000130) [00:23:58] Pmbootstrap v3.0.0_alpha (Python 3.12.7 (main, Oct 7 2024, 11:30:19) [GCC 13.2.1 20240309])
(000130) [00:23:58] $ pmbootstrap /usr/local/bin/pmbootstrap config aports /builds/postmarketOS/pmaports
(000130) [00:23:58] Config changed: aports='/builds/postmarketOS/pmaports'
(000130) [00:23:58] Save config: /home/pmos/.config/pmbootstrap_v3.cfg
(000135) [00:23:58] Pmbootstrap v3.0.0_alpha (Python 3.12.7 (main, Oct 7 2024, 11:30:19) [GCC 13.2.1 20240309])
(000135) [00:23:58] $ pmbootstrap /usr/local/bin/pmbootstrap work_migrate
(000135) [00:23:58] % cd /builds/postmarketOS/pmaports; git remote -v
(000135) [00:23:58] % cd /builds/postmarketOS/pmaports; git show origin-original/master:channels.cfg
(000138) [00:23:59] Pmbootstrap v3.0.0_alpha (Python 3.12.7 (main, Oct 7 2024, 11:30:19) [GCC 13.2.1 20240309])
(000138) [00:23:59] $ pmbootstrap /usr/local/bin/pmbootstrap config aports /builds/postmarketOS/pmaports
(000138) [00:23:59] Config changed: aports='/builds/postmarketOS/pmaports'
(000138) [00:23:59] Save config: /home/pmos/.config/pmbootstrap_v3.cfg
(000139) [00:23:59] Pmbootstrap v3.0.0_alpha (Python 3.12.7 (main, Oct 7 2024, 11:30:19) [GCC 13.2.1 20240309])
(000139) [00:23:59] $ pmbootstrap /usr/local/bin/pmbootstrap -q shutdown
(000139) [00:23:59] (native) % losetup --json --list
chroot: cannot change root directory to '/home/pmos/.local/var/pmbootstrap/chroot_native': No such file or directory
(000139) [00:23:59] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(000139) [00:23:59] NOTE: The failed command's output is above the ^^^ line in the log file: /home/pmos/.local/var/pmbootstrap/log.txt
(000139) [00:23:59] ERROR: Command failed (exit code 125): (native) % losetup --json --list
(000139) [00:23:59] See also: <https://postmarketos.org/troubleshooting>
(000139) [00:23:59] Traceback (most recent call last):
File "/tmp/pmbootstrap/pmb/__init__.py", line 106, in main
run_command(args)
File "/tmp/pmbootstrap/pmb/commands/__init__.py", line 97, in run_command
command.run()
File "/tmp/pmbootstrap/pmb/commands/shutdown.py", line 14, in run
pmb.chroot.shutdown()
File "/tmp/pmbootstrap/pmb/chroot/shutdown.py", line 74, in shutdown
pmb.install.losetup.detach_all()
File "/tmp/pmbootstrap/pmb/install/losetup.py", line 97, in detach_all
losetup_output = pmb.chroot.root(["losetup", "--json", "--list"], output_return=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pmbootstrap/pmb/chroot/run.py", line 124, in root
return rootm(
^^^^^^
File "/tmp/pmbootstrap/pmb/chroot/run.py", line 108, in rootm
return pmb.helpers.run_core.core(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pmbootstrap/pmb/helpers/run_core.py", line 434, in core
check_return_code(code, log_message)
File "/tmp/pmbootstrap/pmb/helpers/run_core.py", line 274, in check_return_code
raise RuntimeError(f"Command failed (exit code {str(code)}): " + log_message)
RuntimeError: Command failed (exit code 125): (native) % losetup --json --list
If the native chroot doesn't exist yet at this point, shouldn't pmb create it automatically if it's trying to run a command in the chroot?