[Zope-CMF] Re: state of GenericSetup trunk and branches
Maurits van Rees
m.van.rees at zestsoftware.nl
Fri Jun 22 20:52:43 EDT 2007
Rob Miller, on 2007-06-21:
> Wichert Akkerman wrote:
>> The new GS looks very nice, but from the ZMI UI I can no longer see how
>> I can import only selected steps of an extension profile. I hope that is
>> still possible; it can be extremely useful. It looks like the import and
>> export tab only act on the base profiels now.
>
> hmm... i think that the aggregate of all of the steps from the various
> profiles that have ever been imported should show up on the import screen, so
> it should be possible to select ones that were added by a specific extension
> profile. but this doesn't help, of course, when you only want to re-import
> the portal types step from an extension profile.
Indeed: currently you will just import the portal types as defined by
the base profile.
> so you're right, the UI is missing a piece. two pieces, actually. on the
> 'profiles' tab, there should be another button, "load import steps", which
> will register the steps w/o actually running them. (importing a profile does
> this for you.) then the import and export tabs can have a dropdown that lets
> you choose from any profiles that have had the steps loaded.
>
> i won't be able to get to that until next week, unfortunately. anyone else?
I have some code that I think does the first part: adding a button on
the Profiles tab and adding some code to support it:
http://paste.plone.org/15348
During testing I noticed that my knowledge of GenericSetup might be
flawed though, as I discovered some things that were new to me, so I
have some questions that crept up.
1. In GenericSetup 1.2, if you select an extension profile on the
Properties tab (now called Profiles), and then go to the Import tab
and import all steps, is that extension profile then basically
treated as a BASE profile?
2. What needs to happen on the import tab now on trunk? We want a
drop down that lists all extension profiles. When I select one of
those extension profiles, should I get a list of only those steps
for which this profile has an xml file? Or should I just get a
list of all steps available (several dozen on Plone 3) and have the
extension profile as context when I click the correct button?
3. When I install Plone 3.0 with the new GenericSetup trunk, and go to
the Import tab, there are about 37 steps listed. That is a lot.
Especially there are a few importVarious steps of different
products, at least when you add some third party products in the
Products dir. I do not know how widespread and generally accepted
those importVarious steps are for third party products. I do
notice that in the current situation in Plone 3 when you go to that
import tab and click Import All Steps, all registered steps are
tried, including all third party importVarious steps.
As a test I added my own eXtremeManagement product in the Products
dir, which also has a GS extension profile with an importVarious
step. I registered this profile with the patch I linked to above.
Then I tried to import all steps. This meant that the
eXtremeManagement importVarious step was run, which gave problems
as it assumed some portal types to be available, which were not
there. I now fixed that by checking what the context is:
def importVarious(context):
if 'Products/eXtremeManagement/profiles/default' \
not in context._profile_path:
return
...
In fact, when running all import steps, the profile path of the
context is that of CMFPlone:
u'/home/maurits/instances/xm30/Products/CMFPlone/profiles/default'
Anyway, for extension profiles we want to give the users a means on
that import tab to get the context right.
I guess my question is:
A. Is my change to eXtremeManagement in the importVarious function
above logical? I committed it already, so it had better be. :)
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?
Thanks for your time,
--
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