'clean' option can go in the way of the build

Bug #1297458 reported by Georges Racinet on 2014-03-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP buildout recipe

Bug Description

The 'clean' option performs an aggressive cleaning, including VCS ignored files. The main use case so far being continuous integration bots and is indeed systematically passed by anybox.buildbot.openerp

In cases where the buildout is also an addon, a pattern which is useful to ship the testing harness in the same repository as the tested addons directory (also meant for CI), it goes as far as to remove buildout-generated technical directories, such as 'develop-eggs'.
This is currently demonstrated with the newly uploaded 'advanced_attachment'.

Buildout configuration:

addons = bzr lp:openobject-addons/7.0 addons-openerp last:1
         bzr lp:openerp-web/7.0 addons-web last:1 subdir=addons
         local .

It works well on a developer's box, but ends like this in the buildbot :

Traceback (most recent call last):
  File "/srv/buildslave/buildbot.anybox.r/buildout-caches/eggs/anybox.recipe.openerp-1.8.2-py2.7.egg/anybox/recipe/openerp/server.py", line 110, in merge_requirements
    self.develop(openerp_dir, setup_has_pil=setup_has_pil)
  File "/srv/buildslave/buildbot.anybox.r/buildout-caches/eggs/anybox.recipe.openerp-1.8.2-py2.7.egg/anybox/recipe/openerp/base.py", line 436, in develop
    zc.buildout.easy_install.develop(setup, develop_dir)
  File "/srv/buildslave/buildbot.anybox.r/buildout-caches/eggs/zc.buildout-2.2.1-py2.7.egg/zc/buildout/easy_install.py", line 887, in develop
    tmp3 = tempfile.mkdtemp('build', dir=dest)
  File "/usr/lib/python2.7/tempfile.py", line 325, in mkdtemp
    _os.mkdir(file, 0700)
OSError: [Errno 2] No such file or directory: '/srv/buildslave/buildbot.anybox.r/advanced_attachment-postgresql-9_2/build/develop-eggs/tmpQO9Pbkbuild'

Note that a locally provided 'develop' distribution (with the 'develop' directive in buildout.cfg) would have the same problem.

At least, the default implementation of clean (rthat's used for a local addon, removes .pycfiles and subsequent empy directories) should exclude buildout's technical directories, such as this one.

In the meanwhile, this can probably be circumvented by placing a placeholder file in the needed directories.

Georges Racinet (gracinet) wrote :

I confirm that committing a placeholder file in develop-eggs circumvents the problem (hence low importance).

Changed in anybox.recipe.openerp:
importance: Undecided → Low
milestone: none → 1.8.3
status: New → Confirmed
Georges Racinet (gracinet) wrote :

'clean' should also exclude all addons directories and the parts directory (the latter being one of those technical ones)

Georges Racinet (gracinet) wrote :

This can wait for 1.8.4, and I'm currently the only one that stumbled on it

Changed in anybox.recipe.openerp:
milestone: 1.8.3 → 1.8.4
Georges Racinet (gracinet) wrote :

It'll wait a bit more

Changed in anybox.recipe.openerp:
milestone: 1.8.4 → 1.8.5
Georges Racinet (gracinet) wrote :

Can wait a bit

Changed in anybox.recipe.openerp:
milestone: 1.8.5 → 1.8.6
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers