[Distutils] [zc.buildout] running in safe mode

Tarek Ziadé ziade.tarek at gmail.com
Wed Oct 1 12:34:07 CEST 2008


Hello

I know it is a bad practice for a recipe to return some paths that
contains important data in the install() method,
because zc.buildout might remove them.

Nevertheless, it happens from time to time that a developer lose some
content because of a misconfiguration,
or a zealous recipe. That is his responsability, and backups are done for that.

But I think we can improve zc.buildout a bit for that:

what about introducing a safe-mode where the developer get prompted
everytime zc.buildout.rmtree is about to call
shutil.rmtree ?

The option could be set in [buildout] like this:

[buildout]
...
safe-mode = true
...

and challenge the user when a tree is about to be delete. (it might be
overkill for single files,
and they are most of the time unimportant configuration files)

This is a small change, and it would avoid running a backup everytime
the .cfg are changed. because
it happens all day long when you are developing.


Regards
Tarek

-- 
Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/


More information about the Distutils-SIG mailing list