Poetry plugin fails on 20.04 base
Metadata
Current evaluation
Poetry plugin failed on Ubuntu 20.04 due to missing python3-poetry package. Resolved via an upstream craft-parts pull request addressing the package lookup logic. Closed as fixed.
Suggested action: —
No scores available.
Issue body
### Bug Description
Poetry plugin fails on 20.04 base, even if installing new version of poetry manually
### To Reproduce
```
git clone https://github.com/canonical/pgbouncer-operator
cd pgbouncer-operator
git checkout 6b6a46ca48200dce2ad4fa9d11c3a8b63458cce1
charmcraft pack -v
```
```
Starting charmcraft, version 3.2.2.post75+gff00a899
Logging execution to '/home/ubuntu/.local/state/charmcraft/log/charmcraft-20241115-131317.698225.log'
Launching managed ubuntu 20.04 instance...
Creating instance from base instance
Starting instance
Starting charmcraft, version 3.2.2.post75+gff00a899
Logging execution to '/tmp/charmcraft.log'
Starting charmcraft, version 3.2.2.post75+gff00a899
Logging execution to '/tmp/charmcraft.log'
Initialising lifecycle
Installing build-packages
Cannot find package listed in 'build-packages': python3-poetry
Failed to execute charmcraft in instance.
Full execution log: '/home/ubuntu/.local/state/charmcraft/log/charmcraft-20241115-131317.698225.log'
```
### Environment
Ubuntu 22.04
```
$ snap list
Name Version Rev Tracking Publisher Notes
charmcraft 3.2.2.post75+gff00a899 5394 3.x/edge canonical✓ classic,held
core18 20240920 2846 latest/stable canonical✓ base
core20 20240911 2434 latest/stable canonical✓ base
core22 20241001 1663 latest/stable canonical✓ base
juju 3.5.4 28520 3/stable canonical✓ -
lxd 5.0.3-80aeff7 29351 5.0/stable/… canonical✓ -
microk8s v1.29.9 7227 1.29-strict/stable canonical✓ -
snapd 2.63 21759 latest/stable canonical✓ snapd
```
### charmcraft.yaml
```yaml
# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.
type: charm
bases:
- name: ubuntu
channel: "20.04"
architectures: [amd64]
- name: ubuntu
channel: "20.04"
architectures: [arm64]
- name: ubuntu
channel: "22.04"
architectures: [amd64]
- name: ubuntu
channel: "22.04"
architectures: [arm64]
parts:
poetry-deps:
plugin: nil
build-packages:
- curl
override-build: |
python3 -m pip install --upgrade pip==24.3.1
curl -sSL https://install.python-poetry.org | python3 - --version 1.8.4
ln -sf $HOME/.local/bin/poetry /usr/local/bin/poetry
foo:
plugin: poetry
source: .
after:
- poetry-deps
poetry-with:
- charm-libs
build-snaps:
- rustup
build-packages:
- libffi-dev
- libssl-dev
- pkg-config
override-build: |
rustup default stable
craftctl default
libpq:
build-packages:
- libpq-dev
plugin: dump
source: /usr/lib/
source-type: local
prime:
- lib/
organize:
"*-linux-gnu/libpq.so*": lib/
```
### Relevant log output
[charmcraft-20241115-131317.698225.log](https://github.com/user-attachments/files/17775955/charmcraft-20241115-131317.698225.log)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 | — | — | Poetry plugin failed on Ubuntu 20.04 due to missing python3-poetry package. Resolved via an upstream craft-parts pull request addressing the package lookup logic. Closed as fixed. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed via an upstream pull request to craft-parts that resolves the missing python3-poetry package error when using the Poetry plugin on Ubuntu 20.04 bases. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed by an upstream craft-parts pull request that resolves the missing python3-poetry dependency causing failures on Ubuntu 20.04 bases. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed via an upstream craft-parts pull request that resolves the missing python3-poetry dependency causing the Poetry plugin to fail on Ubuntu 20.04 bases. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. An upstream pull request was submitted to craft-parts to resolve the Poetry plugin failure on Ubuntu 20.04 caused by a missing python3-poetry package. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1492 Fix poetry plugin for 25.04+ | craft-parts | closed | Fixed by detecting Ubuntu 25.04+ via OsRelease() and conditionally adding python3-poetry-plugin-export to build packages in poetry_plugin.py, resolving the poetry export command failure caused by python3-poetry v2. | |
| #707 `poetry` Python plugin | craft-parts | closed | A Poetry Python plugin was implemented to provide first-class build system support using poetry install. The issue was closed after completion via pull request #820. | |
| #1510 fix(poetry): install export plugin on 25.04+ | craft-parts | merged | Merged fix for Ubuntu 25.04+ compatibility by conditionally installing python3-poetry-plugin-export. This addresses Poetry 2 deprecating the built-in export subcommand in favor of an optional plugin. Approved by reviewers and passed CI. |