ocurrent / obuilder

Experimental "docker build" alternative using btrfs/zfs snapshots
Apache License 2.0
61 stars 18 forks source link

Retry unmount on macOS #192

Closed mtelvers closed 3 weeks ago

mtelvers commented 1 month ago

This may look like a lot of changes, but really, it's just a single line. The new behaviour will now retry the unmount on failure with the addition of the -f flag.

Os.sudo [ "zfs"; "unmount"; "obuilder/result" ]

to

Macos.sudo_fallback [ "zfs"; "unmount"; "obuilder/result" ] [ "zfs"; "unmount"; "-f"; "obuilder/result" ] ~uid:t.uid

Addresses https://github.com/ocurrent/ocaml-ci/issues/975

MisterDA commented 3 weeks ago

For me sudo_fallback sounds like the function will try something once, then if it fails try something else in sudo mode. What about adding a ?fallback argument to the sudo function?

mtelvers commented 3 weeks ago

Yes, I ditched this in favour of https://github.com/ocurrent/obuilder/pull/193.