sureshvv
sureshvv

Reputation: 4412

Why does buildout delete my instance/etc and Extensions folder each time it is run?

Everytime I run buildout to add a product egg, it deletes all the stuff under parts.

How do people deal with this?

Upvotes: 0

Views: 986

Answers (3)

Ida
Ida

Reputation: 3965

Update: To only register a new egg to the instance, you can use buildout's install-command to only build specific parts like this:

buildout install instance

"Why does buildout delete my instance/etc and Extensions folder each time it is run?"

-> Because that's what buildout is made for: To build automatically the parts, the way it is defined in the buildout-configuration-file. Not deleting former dirs and files would easily result in conflicts and errors, I guess. Can anyone confirm?

"How do people deal with this?"

-> By not putting anything in the parts directory at all ;) No seriously, it is not recommended to do it.

What's your specific use-case?

Upvotes: 11

newbery
newbery

Reputation: 433

As has been pointed out already, you should not put any customizations in the "parts" directory directly. You need to put it elsewhere.

Extension methods are generally not needed these days but if you wish to use them, you have a couple of options:

Option 1 Create an Extensions folder in your own product. Put your module at "my.product/my/product/Extensions/mymodule.py" and reference it in the ZMI as "my.product.mymodule"

Option 2 Use the "zope-conf-additional" parameter in plone.recipe.zope2instance to add another location for the Extensions folder like so:

[instance]
recipe = plone.recipe.zope2instance
...
zope-conf-additional = extensions ${buildout:directory}/Extensions

Upvotes: 4

Yuri
Yuri

Reputation: 1074

you can put your customization of zope.conf directly in the buildout. Also, in Plone 4 Extensions is not created anymore, you can put it somewhere else.

For example, this: http://plone.org/products/products.migrateexternalmethods will move your existing external methods to an egg, so you can put them in svn and manage them as you do for your code.

Upvotes: 4

Related Questions