[Product-Developers] Removing a removed "required tool" from genericsetup.

ken manheimer ken.manheimer at gmail.com
Mon Sep 5 18:34:18 UTC 2011

On Mon, Sep 5, 2011 at 1:35 PM, Gilles Lenfant
<gilles.lenfant at alterway.fr>wrote:

> It seems GenericSetup keeps a footprint of tools that have been once
> installed in a Plone site. Unfortunately, someone before me installed a
> 'foo_tool' I can't find what component's GS profile installed it.
> Even removing the footprint of that f...g ghost component does not work/
> del site.portal_setup._toolset_registry._required['foo_too']
> Is there any clue to get rid of that junk component in the required tools ?
> I can't install anything more in this Plone 3.3 site.
> Many thanks by advance for any pointer.

i think you're touching on a serious issue - one i've certainly struggled
with, and i'm sure others have, too.  not too long ago (... it was jan 17)
in included the following posting in my "hints & tips" email folder.  it has
a kind of recipe for working around the problem, including some steps i've
had to vaguely rediscover, time and again.  (i would love to have the
opportunity to do an analysis and see what a proper fix would be, but at
this point it would take funding.)

here's the posting, with full context - hope it's helpful.


---------- Forwarded message ----------
From: Gil Forcada <gil at usecm.com>
Date: Mon, Jan 17, 2011 at 2:25 PM
Subject: Re: [Product-Developers] How to cleanly remove a product?
To: Dylan Jay <djay at pretaweb.com>
Cc: "product-developers at lists.plone.org Developers" <
product-developers at lists.plone.org>, derek <auspex at pointerstop.ca>, Rok
Garbas <rok at garbas.si>

2011/1/17 Dylan Jay <djay at pretaweb.com>

> On 17/01/2011, at 3:06 AM, derek wrote:
> On Jan 16, 11:16 am, Laurence Rowe <l... at lrowe.co.uk> wrote:
>>> hvelarde wrote:
>>> guys, is a very bad practice not to write uninstallers (and tests for
>>>> them) in your products.
>>> Unfortunately it is almost impossible to write an uninstaller - as even
>>> removing a persistent component registration does not remove all
>>> references
>>> to that key.
>> I'm so thrilled to see that from someone I consider an authoritative
>> source!  "Almost impossible" probably explains why I've yet to find an
>> even half-way decent howto.
>> And for people who write packages as part of customer projects,
>>> it is difficult to justify the time to write an uninstaller.
>> Exactly. I'd bite the bullet and try to write a good uninstaller if I
>> was making products for the general public, but for my one-off
>> customer projects it really doesn't seem worth the effort.
>> I think the
>>> real solution to this is to make content import/export work work
>>> correctly
>>> (getting close with transmogrifier) so that you can zap and recreate a
>>> site
>>> complete with content.
>> Close, but still no cigar.  Dylan's done a good job with funnelweb, as
>> far as it goes, but there's still a major manual component in
>> importing content.
> Funnelweb is for "random site"->Plone conversions. There are much better
> tools for Plone->Plone content migrations since they can make more
> assumptions and gain deeper access to the data. Is there a name for these?
Ok, FINALLY after a week long looking after this I have them (hopefully)
gone :)

The basic modus operandi was:
- add the offending products on the buildout
- run the buildout
- uninstall all products still installed
- force the generic setup code to run by reinstalling a module which has
propertiestool (membrane for example)
- remove all the tools on the ZMI site root
- add an ipdb to GenericSetup/registry.py on listRequiredTools method (line
576 or so)
    [i generally use 'import pdb; pdb.set_trace()', but ipdb looks cool!
- remove the offending products on the buildout and rerun it
- remove the products from ZMI -> Control_Panel -> Products
- remove the portal_setup missing steps (if any)
- force the generic setup code again and when it hits the ipdb remove the
tools with a "del self._required['TOOL_NAME']

That way they are gone for good!

I hope it will be useful to someone.

Thanks for all the pointers and ideas!



*Gil Forcada**
*C/Llacuna, 166 2n.2a (Edifici Llacuna)
telf: - 619.65.34.92
fax: 93.320.93.97
gil at usecm.com

Product-Developers mailing list
Product-Developers at lists.plone.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20110905/a1e15b50/attachment.html>

More information about the Product-Developers mailing list