On Wed, Apr 24, 2013 at 11:36:09AM +1200, Robin Sheat wrote: > My feelings on making koha-create more atomic are that this might > require a rewrite in Perl to really do it. Ideally for every operation > performed, we would store the undo operation onto a list. If we > encounter a failure, we play back the undo operations to get everything > back to the initial state. It probably won't be perfect, but I think > it'll be a huge improvement.
I would like koha-remove to be able to deal with partially removed instances, currently it runs as `set -e` meaning if any of the remove operations fail it will give up on the rest. This may be as simple as removing the `set -e` flag. Once this is done dealing with a koha-create failure is as simple as running koha-remove on the instance you just failed to created, it may also be possible for koha-create to automatically call koha-remove on such an error by using the trap feature of bash. The disadvantage to this approach is that it could remove files that were not created by koha-create, although such files would most likely be stomped over by koha-create anyway so I am not sure if this would be an issue or not. Cheers, ~Chris Hall _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/