Hey Mark,
Sorry for the lag - been busy trying to get a new HAL release out,
On Tue, 2007-03-27 at 15:14 +0100, Mark McLoughlin wrote:
Hi, Apologies for spamming the list with 20 mails, but hopefully it'll make it easier to review the patches.
Yeah, it did make it easier although I'm always slighty scared when seeing a bunch of patches ;-) - would you happen to have a git repo handy that I can pull from?
The background to this is that I was suprised to see that livecd-creator had rather poor error handling (e.g. not unmounting stuff after certain errors, obscure error messages etc.) since I thought that was the main reason to re-write pilgrim in python :-)
It's understandable, though. Because Python has exceptions, it's easy to be fooled into thinking you have error conditions under control, but in reality, exceptions probably makes it easier to screw up error handling.
So, here's an attempt to fix it based on the following guidelines:
don't intercept an exception if you can't do something useful with it. Corollary: intercept an exception if you can do something useful with it.
anticipate user errors or user-fixable system errors in a user friendly manner. Corollary: allow other types of exceptions to be passed to the toplevel.
i.e. there are 3 types of errors/exceptions, and 3 different strategies for handling them:
errors which we can handle ourselves without ever telling the user - e.g. a directory which we wish to create already exists
user errors, or predictable system errors, which we should do our best to help the user out with - e.g. a busted kickstart file or running out of loop devices
pathological system errors or programmer errors, all of which can be just allowed to propogate up to the toplevel where an ugly traceback will be printed - e.g creating a dir under the temporary build dir fails or an unmount fails because we didn't close the rpmdb
whatever the error, we should do our best to clean up files, directories, mounts, etc. which we created
bear in mind that e.g. Ctrl-C can happen at any time
Also, I've cleanup up various parts of the code as I worked on the error handling. Those patches come first.
This is really good stuff, thanks a bunch for working on it. I just read through all the patches and from a cursory look they look good to me; tomorrow I'm going to try and actually apply them to the code [1].
I'd also like for Jeremy to sign them off as he was the last one before you to fix up my, uh, rough bash->python conversion of the pilgrim shell script plus he's the main guy working on this stuff these days.
Thanks again, Cheers, David
[1] : As a practical thing would you happen to have a git repo stashed somewhere that I can pull form?
Hi David,
On Mon, 2007-04-02 at 00:51 -0400, David Zeuthen wrote:
[1] : As a practical thing would you happen to have a git repo stashed somewhere that I can pull form?
This git business is pretty new to me, but I created a markmc branch, pushed the patches from quilt into git, ran git-update-server-info and rsync-ed .git to here:
http://www.gnome.org/~markmc/livecd-markmc.git
Probably a silly way of doing it, but it should suffice.
Cheers, Mark.
On Mon, 2007-04-02 at 00:51 -0400, David Zeuthen wrote:
This is really good stuff, thanks a bunch for working on it. I just read through all the patches and from a cursory look they look good to me; tomorrow I'm going to try and actually apply them to the code [1].
I'd also like for Jeremy to sign them off as he was the last one before you to fix up my, uh, rough bash->python conversion of the pilgrim shell script plus he's the main guy working on this stuff these days.
Looks good to me. I merged it all and pushed to the master. If anyone notices problems, holler.
On a barely related note -- would it be interesting to set up commit spam to the list? I don't know that we have enough commits for it to be overwhelming and it could definitely be useful.
Jeremy
Jeremy Katz wrote:
On a barely related note -- would it be interesting to set up commit spam to the list? I don't know that we have enough commits for it to be overwhelming and it could definitely be useful.
Jeremy
That would be a good idea.
J. Hartline
livecd@lists.fedoraproject.org