yuppie, on 2007-12-20:
> Hi!
> Wichert Akkerman wrote:
>> Previously yuppie wrote:
>>> GenericSetup trunk has global step registries. I propose to use the new 
>>> ZCML directive for registering all GenericSetup and CMF import and 
>>> export steps globally. And to remove the import_steps.xml and 
>>> export_steps.xml files from the profiles shipped with CMF.
>>> This also requires to add a flag file for the 'various' step.
>>> I already started implementing this. If there are no objections, I'll 
>>> soon check in my changes.
>> +1
>> there is one thing missing at the moment: unregistering the old
>> profile-registered steps. I'm not sure what the right way to do that is.
> listExportSteps() and getSortedImportSteps() now have unit tests and no 
> longer return duplicates. AFAICS we now have a clean override behavior 
> and nothing breaks if the same step is registered locally *and* globally.
> But I agree there should be a way to remove obsolete and broken local 
> steps. A method that removes local duplicates of global steps and a 
> method that removes broken steps would be useful. Not sure if they 
> should be run automatically or if there should be a cleanup button in 
> the UI.

You probably know perfectly well how to do this, but for the record,
here is some installer code from a client project where we remove an
obsolete import step.

  registry = setup.getImportStepRegistry()
  if u'lumberjack' in registry.listSteps():
      print >> out, "Found stale lumberjack import step, removing it."
      temp = registry._registered
      registry._registered = temp
      del temp
      print >> out, "Removed stale lumberjack import step."

Maurits van Rees | http://maurits.vanrees.org/
            Work | http://zestsoftware.nl/
"From an eekhoorn grows an oak." [semi-Dutch proverb]

Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to