Closed rfc6919 closed 1 year ago
I've merged this into the internal nightly build system. If it doesn't cause any issues, I'll merge the PR in a few days.
Thanks!
Pushed a couple of fixes.
unmount_image
returns false and halts the whole build if the image isn't mounted in the first place. Adding the if
statement back rather than using &&
should fix that.
Then if the loopback device is attached but the either partition is not mounted, you get umount: /dev/loopXpN: not mounted.
and again, false is returned.
If the mounted partitions have subdirectories mounted, then umount
isn't enough. Maybe an a recursive umount
would be fine, but there's already an unmount
option which should do the right thing.
I've also changed it to iterate over all the partitions rather than assuming there are only two.
Seems to work now, thanks.
per https://github.com/RPi-Distro/pi-gen/issues/639, use a single partitioned loop device rather than multiple devices with offset/length.
testing is limited to "works for me, and doesn't leave any new errors in the output of build.sh". is there an actual test suite or anything like that?