[Fedora-livecd-list] [PATCH 1/6] Set the build directory

Jeremy Katz katzj at redhat.com
Wed Aug 8 16:47:09 UTC 2007


On Wed, 2007-08-08 at 12:59 +0200, Jeroen van Meeuwen wrote:
> 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]: "

And in this case, you just say "the tree is at /path/to/build_dir.  be
sure to clean up afterwards by running the following".  Since you're
going to have to say where it is _anyway_.  And if they say they don't
want to inspect it, then you can still have the object around to do the
cleanup.

Given the scariness of removing directories that are important to the
system and the fact that there are other ways around the clean up case,
I'm really having a hard time justifying this to myself.

Jeremy




More information about the livecd mailing list