Closed esunar closed 1 year ago
The correct way of dealing with this is to specify charm bases in the charmcraft.yaml
(https://discourse.charmhub.io/t/charmcraft-bases-provider-support). If you specify 18.04 as your base you will get the expected result.
Previously the python in the snap was used when populating the charm wheelhouse, and incidentally the snap used a core18 base, which is why this used to work for you.
Tying a charm's wheelhouse to the base used in the charm-tools snap is not maintainable so the default has been changed to use the Python in the build environment. As noted in the changelog you can use the --use-python-from-snap
argument to restore the old behavior, but given the charm snap now uses a core22 base (Python 3.10) it would not resolve your issue.
solution in #638 works
The original issue was reported in charmcraft repository, but probably the issue is that
reactive
losing compatibility withbionic
Building a dummy
reactive
charm withcharm 3.x
results in an error ininstall
hook. Examplecharmcraft.yaml
:Installation in
bionic
environment results in such error logThe complete error log is available here
For some reason, downgrading
charm
version to2.x
helps for some reason. Checkout the demo for easy testing of the issue from the original issueAlso reproduces for
fstab-config
charm. Probably otherreactive
charms are affected too.We cannot pack the charm in 18.04(with charm 3.x) because charm snap needs python>3.7 and 18.04 has python 3.6.9
We cannot deploy it into bionic if we build with charm snap 3.x build on 22.04 because this wheelhouse is built from the basic layer and built on 22.04 that has python > 3.7