[Zope-CMF] Re: state of GenericSetup trunk and branches

Maurits van Rees m.van.rees at zestsoftware.nl
Mon Jun 25 18:52:55 EDT 2007


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 step 
> 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.

(http://dev.plone.org/collective/changeset/44567)

>>    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 action. 
>   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. :)

http://maurits.vanrees.org/weblog/archive/2007/06/discovering-genericsetup

-- 
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."



More information about the Zope-CMF mailing list