Skip to content

Commit

Permalink
[FIX] packaging: fix lxml.html.clean split
Browse files Browse the repository at this point in the history
Since lxml.html.clean was moved to a separate package starting in lxml
5.2 the odoo Debian package was broken in Ubuntu 24.04.

A first fix was attempted in 318df32. While the package was properly
built with this fix and was installable, but Odoo failed to start under
Ubuntu. The bug flew under the radar because the simple test after the
package build is done with a Docker based on Debian Bookworm.

In fact, the fix was not taken into account because the python packages
defined in the debian/control are not really taken into account by
dh_python3 that tries to compute the python dependencies.

With this commit, a py3dist-overrides file is used to overrides the
package mapping between python packages and debian packages. The same
pipe trick is used as in the previous fix to ensure that the package is
installable in Ubuntu 24.04 (which provides python3-lxml-html) and in
Debian Bookworm (which does not provide the python3-lxm-html).

Finally, the Docker image used for the build and the test is changed to
use Ubuntu 24.04.

closes odoo#181388

Signed-off-by: Xavier Dollé (xdo) <[email protected]>
  • Loading branch information
d-fence committed Sep 26, 2024
1 parent bd79034 commit 59709ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions debian/py3dist-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lxml python3-lxml-html-clean | python3-lxml
5 changes: 4 additions & 1 deletion setup/package.dfdebian
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Please note that this Dockerfile is used for testing nightly builds and should
# not be used to deploy Odoo
FROM debian:bookworm
FROM ubuntu:noble
MAINTAINER Odoo S.A. <[email protected]>

RUN userdel -r ubuntu

RUN apt-get update && \
apt-get install -y locales && \
rm -rf /var/lib/apt/lists/*
Expand Down Expand Up @@ -35,6 +37,7 @@ RUN apt-get update -qq && \
python3-jinja2 \
python3-libsass \
python3-lxml \
python3-lxml-html-clean \
python3-ofxparse \
python3-openpyxl \
python3-passlib \
Expand Down

0 comments on commit 59709ca

Please sign in to comment.