Comment 0 for bug 396934

Revision history for this message
gotti (gottfried-ganssauge) wrote :

shutil.rmtree fails on Windows when it tries to remove directories containing readonly files:

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "C:\Daten\Dokumente und Einstellungen\gotti\aurora\eggs\zc.buildout-1.3.0-py2.4.egg\zc\buildout\buildout.py", line 1519, in main
    getattr(buildout, command)(args)
  File "C:\Daten\Dokumente und Einstellungen\gotti\aurora\eggs\zc.buildout-1.3.0-py2.4.egg\zc\buildout\buildout.py", line 473, in install
    installed_files = self[part]._call(recipe.install)
  File "C:\Daten\Dokumente und Einstellungen\gotti\aurora\eggs\zc.buildout-1.3.0-py2.4.egg\zc\buildout\buildout.py", line 1101, in _call
    return f()
  File "c:\daten\dokumente und einstellungen\gotti\aurora\eggs\plone.recipe.zope2install-3.1-py2.4.egg\plone\recipe\zope2install\__init__.py", line 192, in install
    shutil.rmtree(location)
  File "c:\daten\dokume~1\gotti\lokale~1\temp\tmp1ftbrp\shutil.py", line 163, in rmtree
  File "c:\daten\dokume~1\gotti\lokale~1\temp\tmp1ftbrp\shutil.py", line 168, in rmtree
  File "c:\daten\dokume~1\gotti\lokale~1\temp\tmp1ftbrp\shutil.py", line 166, in rmtree
OSError: [Errno 13] Permission denied: 'C:\\daten\\Dokumente und Einstellungen\\gotti\\aurora\\parts\\zope\\.svn\\dir-prop-base'

A possible solution would use zc.buildout.rmtree.rmtree instead.