[FIX] packaging: stop moving addons for deb package

The package.py script is moving the addons in odoo/addons which is not
more necessary for the Debian package as it's made at the Debian
packaging level. So package.py will not do that anymore.

closes odoo/odoo#60442

X-original-commit: 27b755a3dfe1e2a580fd436038a60df19e9d83ab
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit is contained in:
Christophe Monniez
2020-10-21 11:59:55 +00:00
parent dc9505b019
commit defd6ac925
+4 -2
View File
@@ -168,7 +168,7 @@ def gen_rpm_repo(args, file_name):
shutil.rmtree(temp_path)
def _prepare_build_dir(args, win32=False):
def _prepare_build_dir(args, win32=False, move_addons=True):
"""Copy files to the build directory"""
logging.info('Preparing build dir "%s"', args.build_dir)
cmd = ['rsync', '-a', '--delete', '--exclude', '.git', '--exclude', '*.pyc', '--exclude', '*.pyo']
@@ -176,6 +176,8 @@ def _prepare_build_dir(args, win32=False):
cmd += ['--exclude', 'setup/win32']
run_cmd(cmd + ['%s/' % args.odoo_dir, args.build_dir])
if not move_addons:
return
for addon_path in glob(os.path.join(args.build_dir, 'addons/*')):
if args.blacklist is None or os.path.basename(addon_path) not in args.blacklist:
try:
@@ -541,7 +543,7 @@ def main(args):
except Exception as e:
logging.error("Won't publish the rpm release.\n Exception: %s" % str(e))
if args.build_deb:
_prepare_build_dir(args)
_prepare_build_dir(args, move_addons=False)
docker_deb = DockerDeb(args)
docker_deb.build()
try: