How Profiles are Applied
Okay, so you know now that profile import steps are additive. Let's look at the implications of this. To do so, we'll once again be following the adventures of our good friend Guy Ablaze, who has now drunk deeply of the GenericSetup kool-aid, having repented for and moved beyond his former Python-based install method ways.
Say Guy adds a Plone site. When he does, of course the "Plone Site" base profile is applied to his site, as it is for every Plone site. But then he wants to install the membrane product. membrane, it turns out, doesn't use the QuickInstaller / install method mechanism for installation, but instead provides an extension profile. So he goes to the portal_setup properties tab and selects "membrane" as the active site configuration. Then he returns to the import tab and clicks the "Import all steps" button.
GenericSetup will then iterate through every registered import step, which includes all of the steps of the base profile and the two additional steps defined by membrane's extension profile. For each step, it will examine the active profile to see it contains any applicable configuration. If config info for that import step exists, then the step will run and the configuration will be applied. If there is no config info for that step, then the step will be skipped and nothing will happen.
This is an important point, with some interesting consequences. Let's look at the membrane setup profile. You'll notice that the import_steps.xml file defines some new import steps. But you'll notice that it does NOT include a "toolset" import step, even though the membrane profile DOES include a toolset.xml file. It is unnecessary to add a "toolset" import step to the membrane profile, because this step is already registered with the base profile. When the "Import all steps" button is pressed, most of the registered steps will do nothing. But the "toolset" step will find the toolset.xml file and will apply the configuration there. Likewise, the additional import steps will find corresponding configuration info, and these steps will be run.
If Guy were to switch back to "Plone Site" as the active profile and then click on "Import all steps", then it would (re)apply all of the base configuration settings, but it would not find any configuration info for the membrane-specific steps, and would therefore skip them.
You might realize, then, that it is a good idea to become familiar with all of the import steps in the default Plone base profile. These are all available to you when you create extension profiles, and they don't even need to be added to your import_steps.xml file. All you need to do to define new types is to include a types.xml file and a properly constructed "types" folder. Similar statements hold true for specifying actions, workflows, and for registering skin paths.
In fact, if you are creating an extension profile that introduces no custom import steps, then you don't even NEED an import_steps.xml file. That's right... if you create a profile that defines some new types, maybe a workflow or two, a couple of custom actions, all of those profile steps are already included in Plone's default set of import steps. You only need to add an import_steps.xml file to your profile when you are introducing steps that are not included in the base profile.
Now, if you dare, you can go back to the last section and re-read the bit about the "gotcha". If you've understood everything I've covered here, you'll understand why the setup tool behaves in the manner described.
You still with me? Great, let's move on and learn about exports and snapshots.
