← Back to issue list

pip wheel cache ignored

View original Github issue

Metadata

Project
charmcraft
Number
#1374
Type
issue
State
closed
Author
carlcsaposs-canonical
Labels
Created
Updated
Closed

Current evaluation

Fixed in charmcraft 2.5.4 by updating pip to version 23+, resolving the wheel cache issue caused by pip 22's --no-binary handling. Verified by the reporter and closed.

Suggested action:

No scores available.

Issue body

### Bug Description ## Expected behavior After charmcraft LXC containers are deleted, the pip cache added in charmcraft 2.5 is used in the next pack ## Actual behavior After charmcraft LXC containers are deleted, the next pack takes the same amount of time if the pip cache is present or missing ### To Reproduce ``` sudo snap install charmcraft --channel candidate --classic git clone https://github.com/canonical/mysql-router-k8s-operator cd mysql-router-k8s-operator tox run -e pack-wrapper mv requirements-last-build.txt requirements.txt charmcraft pack -v lxc --project charmcraft ls lxc --project charmcraft delete base-instance-charmcraft-buildd-base-v20-2046f14fb4a00aa9ce50 lxc --project charmcraft delete charmcraft-mysql-router-k8s-520528-0-0-amd64 time charmcraft pack -v lxc --project charmcraft delete base-instance-charmcraft-buildd-base-v20-2046f14fb4a00aa9ce50 lxc --project charmcraft delete charmcraft-mysql-router-k8s-520528-0-0-amd64 rm -r ~/snap/charmcraft/common/cache/charmcraft/ time charmcraft pack -v ``` ### Environment Ubuntu 22.04 charmcraft snap rev 1736 ### charmcraft.yaml ```shell # Copyright 2022 Canonical Ltd. # See LICENSE file for licensing details. type: charm bases: - build-on: - name: "ubuntu" channel: "22.04" run-on: - name: "ubuntu" channel: "22.04" parts: charm: override-pull: | craftctl default if [[ ! -f requirements.txt ]] then echo 'ERROR: Use "tox run -e build" instead of calling "charmcraft pack" directly' >&2 exit 1 fi charm-entrypoint: src/kubernetes_charm.py prime: - charm_version - workload_version - scripts build-packages: - libffi-dev - libssl-dev - pkg-config - rustc - cargo ``` ### Relevant log output ```shell See first comment ```

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Fixed in charmcraft 2.5.4 by updating pip to version 23+, resolving the wheel cache issue caused by pip 22's --no-binary handling. Verified by the reporter and closed.
qwen/qwen3.6-35b-a3b Resolved in charmcraft v2.5.4 by upgrading pip to version 23. The issue stemmed from pip 22 ignoring the wheel cache when --no-binary specified a package list. Upgrading pip restored correct cache behavior, verified by the reporter.
qwen/qwen3.6-35b-a3b Resolved in charmcraft v2.5.4 by upgrading to pip >=23, which correctly respects the wheel cache with specific --no-binary flags. The reporter confirmed the fix across multiple scenarios, and the issue is closed.
qwen3.6-35b-a3b-mtp-q6 Resolved in charmcraft v2.5.4 by upgrading to pip >= 23. The upgrade corrects pip 22 behavior where --no-binary package lists ignored the wheel cache. Author verified the fix across all test cases. Issue closed.
qwen3.6-35b-a3b-mtp-q6 Resolved in charmcraft 2.5.4 by upgrading pip to version 23 or later. Pip 22 incorrectly ignored the wheel cache when using --no-binary with specific packages. The reporter confirmed the fix works across all test scenarios and the issue was closed.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2006 Noisy output in newest charmcraft charmcraft open Charmcraft 3.2.2 build logs a pip cache permission warning ('/root/.cache/pip not owned or writable') during dependency install; reporter notes it appears under --verbose and hints at a real cache/permission issue. No maintainer response; last activity 381 days ago.
72%
#1437 fix(charm_builder): bump minimum pip version to 23 charmcraft merged Merged update bumping the minimum pip version to 23, resolving wheel cache issues with strict dependency flags. Approved by two reviewers, passed CI, and recommended for cherry-picking to the 2.5 branch.
71%