Jeremy Katz wrote:
On Tue, 2007-08-07 at 23:28 +0200, Jeroen van Meeuwen wrote:
> There's an addition problem with having tempfile.mkdtemp(), and that is
> that mounts can not easily be unmounted in a next run, if the creation
> of live media fails in one way or the other. Having a "static"
> build_dir, it can be used to check for existance, and be unmounted.
> You'd not be running out of loop devices anymore. If the directory
> already exists, the app complains and exits appropriately, or allows the
> user to act upon it and save his data.
What/how are you expecting the user to do on the failure? Why not
teardown immediately on failure (or at least, before you throw away the
object you had)? Outside of cases where we're currently traceback'ing
and not catching it[1], livecd-creator should be cleaning up after
itself on error pretty much all the time and thus not running out of
loop devices
True. On the other hand one may need/want to inspect the tree, in our
case we usually do. If everything is tried and excepted, teardown on
failure should be optional, or requested feedback upon in the form of a
dialog:
"We failed and now want to clean up. Do you want to inspect the tree
first? Navigate there and there and knock yourself out."
"Now, do you want to keep this tree for further investigation? [y/N]: "
Kind regards,
Jeroen van Meeuwen
-kanarip