Draft: pmb.install.losetup: Avoid using --json parameter for losetup in detach_all()
The default losetup implementation in Alpine and thus postmarketOS is BusyBox losetup. It doesn't support the --json parameter, and so unless the util-linux variant gets installed this code path won't work. Installing additional packages during shutdown doesn't seem like a great approach to me as it makes this code path more fragile and completely breaks it if e.g. your Internet is out, so just bring back the old code from shutdown.py in pmbootstrap 2.3.1 to do this job for us.
Co-developed-by: Oliver Smith ollieparanoid@postmarketos.org
Fixes 0975d064
Closes #2465 (closed) Supersedes: !2435 (closed)
@craftyguy, @caleb, @ollieparanoid does this seem reasonable to you?
Merge request reports
Activity
changed milestone to %3.0.0 critical path (blockers only!!)
added type::fix label
I probably shouldn't be the one doing this, I don't really know how this code is supposed to work. This code appeared to work for me because I looked at the mounts in
lsblk
, but when I actually look at it the only reason it doesn't crash is because it never enters the loop. If it did, it would crash since I'm not even importing e.g. glob. And yet, I didn't notice anything odd, so clearly my testing methodology is wrong. What is the symptom of the losetup partitions not being unmounted properly supposed to be?mentioned in commit 1ec55fc1
mentioned in merge request !2437 (merged)
mentioned in issue #2465 (closed)
Is this still relevant after !2437 (merged)?
IIUC the patch I reverted was meant to do something meaningful / fix an issue (or something, I didn't investigate), so I'm assuming that we might still want what that originally intended to do and maaaybe it would be reimplemented here? That's why I didn't close this MR, but I'll defer to @Newbyte on how he wants to proceed
Superseded by !2450 (merged).