Rob Miller, on 2007-06-25:
> it's a reasonable first pass, and it's much better than not having it there.
> a better approach would be that taken by Plone, where you have the import
> check the profile for the existence of a file with a specific name. if the
> file exists, run the step, if not, don't. then you 'touch' that file so it
> exists in your profile.
I switched to checking a file now. Thanks.
>> B. These importVarious steps that eXtremeManagement and other
>> products define, and that cannot be mapped to other handlers,
>> are they good practice? Or are they an abomination, bound to
>> lead to problems?
> they're not exactly an abomination, but they do have a gigantic gotcha that
> you've hit on here. i'll restate it clearly:
> IT IS THE RESPONSIBILITY OF AN IMPORT STEP'S IMPLEMENTATION TO ENSURE THAT IT
> IS INDEED APPROPRIATE TO PERFORM ITS ACTIONS DURING ANY GIVEN INVOCATION OF
> THE STEP.
> all of the XML-based import steps already do this; they check for the
> existence of a specific XML file, and if they find it they perform the
> if they do not find the file, no problem, they do nothing.
> the so-called 'importVarious' steps, i.e. any step that uses a plain old
> python function as its handler (as opposed to building on the existing XML
> parsing infrastructure), must perform this check explicitly. you could
> restrict it to only running when the intended profile is the one being
> imported, or you could check for the existence of a specific file within the
> profile. i like the latter choice.
> i tried to say this in my tutorial on plone.org
> (http://plone.org/documentation/tutorial/genericsetup), but i wrote that some
> time ago, it could probably be updated to be more clear about this issue.
I think I have read at least part of that a while ago before I started
with GS profiles. I should probably read that again now I have more
experience with GS.
> anyway, hope this clears things up.
Sure does. Thanks.
I gathered some things I learned about GS the last days and put it on
my weblog, quoting you extensively. :)
Maurits van Rees | http://maurits.vanrees.org/ [NL]
Work | http://zestsoftware.nl/
"Do not worry about your difficulties in computers,
I can assure you mine are still greater."
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests