[FIX] runbot: overwrite duplicate addons

The web addon is supposed to be duplicate, and needs to be installed
(in the enterprise version) over the community edition.

A better fix would be to keep the folder and use the --addons-path key
to start the server with the correct addon, but this is an urgent
change.

closes #69
This commit is contained in:
ged-odoo 2015-06-17 13:01:57 +02:00 committed by Julien Legros
parent d7edc2b0d5
commit c3e2a6f72d

View File

@ -648,15 +648,15 @@ class runbot_build(osv.osv):
]
# move all addons to server addons path
for module in set(glob.glob(build.path('addons/*')) + additional_modules):
for module in uniq_list(glob.glob(build.path('addons/*')) + additional_modules):
basename = os.path.basename(module)
if not os.path.exists(build.server('addons', basename)):
shutil.move(module, build.server('addons'))
else:
if os.path.exists(build.server('addons', basename)):
build._log(
'Building environment',
'You have duplicate modules in your branches "%s"' % basename
)
shutil.rmtree(build.server('addons', basename))
shutil.move(module, build.server('addons'))
def pg_dropdb(self, cr, uid, dbname):
run(['dropdb', dbname])