Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: CMF

[GenericSetup] Extension profile re-installing base profile

 

 

Zope cmf RSS feed   Index | Next | Previous | View Threaded


lists at zopyx

Jun 22, 2009, 10:48 PM

Post #1 of 2 (694 views)
Permalink
[GenericSetup] Extension profile re-installing base profile

We are currently migration from Zope 2.8/CMF 1.X to Zope 2.11/CMF 2.1.

I have a minimal base profile and two almost identical extension
profiles for
product A and B (both containing toolset.xml, skins.xml and
import_steps.xml).
The setup code is almost identical with the one from
CMFDefault.factory.addConfiguredSiteForm().
So what's happening:

- creating a CMF site with the base profile + extension profile for A
works as expected
- creating a CMF site with the base profile + extension profile for B
works but the setuphandler
code of the base profile is executed twice (triggered through the
installation of the extension
profile for B)

- creating a CMF site with the base profile + both extension profiles
for A + B fails
with a 'Exisiting registration...' error

General question: what might be the reason for extension profile B to
trigger the reinstallation
of the base profile (and its setuphandler)?

Andresa
Attachments: lists.vcf (0.31 KB)


m.van.rees at zestsoftware

Jun 23, 2009, 12:04 AM

Post #2 of 2 (634 views)
Permalink
Re: [GenericSetup] Extension profile re-installing base profile [In reply to]

Andreas Jung, on 2009-06-23:
>
> We are currently migration from Zope 2.8/CMF 1.X to Zope 2.11/CMF 2.1.
>
> I have a minimal base profile and two almost identical extension
> profiles for
> product A and B (both containing toolset.xml, skins.xml and
> import_steps.xml).
> The setup code is almost identical with the one from
> CMFDefault.factory.addConfiguredSiteForm().
> So what's happening:
>
> - creating a CMF site with the base profile + extension profile for A
> works as expected
> - creating a CMF site with the base profile + extension profile for B
> works but the setuphandler
> code of the base profile is executed twice (triggered through the
> installation of the extension
> profile for B)
>
> - creating a CMF site with the base profile + both extension profiles
> for A + B fails
> with a 'Exisiting registration...' error
>
> General question: what might be the reason for extension profile B to
> trigger the reinstallation
> of the base profile (and its setuphandler)?

You say here that the base profile including its setuphandler is
applied twice. Above you said that only the setuphandler is run
twice. Which is it?

The setuphandler of the base profile should have some code like this
to make sure it is executed only at the moment the base profile itself
is applied:

def setuphandler_from_base_profile(context):
# Only run step if a flag file is present
if context.readDataFile(flagfile_for_base_profile.txt') is None:
return
... Do something useful here...

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

But if a check like that is missing, I would expect this setuphandler
to be executed when applying profile A as well, which is not
happening. Perhaps there is a check that somehow treats profile A and
B differently?

I would say go in with a pdb and see if the traceback tells you
anything about why the setuphandler gets executed again.

--
Maurits van Rees | http://maurits.vanrees.org/
Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]

_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Zope cmf RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.