← Back to issue list

Charmcraft (2.0.0) pack with build-packages failing on GitHub actions (but 2.1.0 - latest/candidate - is working)

View original Github issue

Metadata

Project
charmcraft
Number
#883
Type
issue
State
closed
Author
marceloneppel
Labels
Created
Updated
Closed

Current evaluation

Closed as not a Charmcraft bug. The build-packages failure on updated GitHub Actions runners was attributed to an underlying Craft Providers library update. A manual apt-get update workaround exists, and version 2.1.0 resolves the issue.

Suggested action:

No scores available.

Issue body

# Issue Hi Charmcraft team! This is kind of a report of a possible bug on 2.0.0 (latest/stable), but that seems to be working fine on 2.1.0 (latest/candidate). My intention Is just to let you know about that, because I could't find anything related to that in the [release notes for 2.1.0](https://github.com/canonical/charmcraft/releases/tag/2.1.0). To be fair, it seems to be probably a bug related to the combination of Charmcraft 2.0.0 and `GitHub Actions Runner` version 2.297.0 and image version 20220922.2 (because Charmcraft 2.0.0 was working correctly with the previous runner and image versions some days ago: 2.296.2 and 20220920.2, respectively). The error happens when we try to provide a package, like `rustc`, on the `build-packages` section of `charmcraft.yaml`: ```yaml parts: charm: build-packages: - rustc ``` And later we try to run `charmcraft pack --destructive-mode --quiet`, the same way is done in some charming actions, like [upload-charm](https://github.com/canonical/charming-actions/blob/8a1577624eb7726de8b8c95b31be31eb1a1813d5/src/actions/upload-charm/upload-charm.ts#L52). Then we face the following error: ```sh Run /usr/bin/sudo charmcraft pack --destructive-mode --quiet [2](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165497987/jobs/5154571422#step:4:2) /usr/bin/sudo charmcraft pack --destructive-mode --quiet [3](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165497987/jobs/5154571422#step:4:3) shell: /usr/bin/bash -e {0} [4](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165497987/jobs/5154571422#step:4:5) Parts processing error: Cannot install all requested build packages: libstd-rust-1.59=1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2, libstd-rust-dev=1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2, rustc=1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2 [5](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165497987/jobs/5154571422#step:4:6) Full execution log: '/root/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20221001-173515.282450.log' [6](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165497987/jobs/5154571422#step:4:7) Error: Process completed with exit code 1. ``` [This](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165529657/jobs/5154626398) is a successful action run using latest/candidate and [this](https://github.com/marceloneppel/charmcraft-pack-test/actions/runs/3165497987/jobs/5154571422) is a failed job using latest/stable. The intention of this issue is to let you know about that and maybe take some action if it is needed, as it seems that 2.1.0 solves the problem and I hope it will land stable soon. I could't get more details about the reason 2.0.0 worked before and doesn't work anymore, or the difference between the two versions when running in the new GitHub Actions Runner version, but I can take a look later if it helps on something.

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Closed as not a Charmcraft bug. The build-packages failure on updated GitHub Actions runners was attributed to an underlying Craft Providers library update. A manual apt-get update workaround exists, and version 2.1.0 resolves the issue.
qwen/qwen3.6-35b-a3b Charmcraft 2.0.0 build-packages failed on GitHub Actions due to package resolution errors. Upgrading to 2.1.0 resolved the issue, attributed to an updated Craft Providers library. The maintainer closed the report as fixed.
qwen3.6-35b-a3b-mtp-q6 Closed. Attributed to an upstream Craft Providers library update causing package resolution failures on GitHub Actions. Charmcraft 2.1.0 candidate resolves the issue, and running apt-get update manually provides a workaround.
qwen3.6-35b-a3b-mtp-q6 Charmcraft 2.0.0 failed to install build-packages on GitHub Actions due to package resolution errors. Maintainers closed the report, attributing the fix to Craft Providers updates. Upgrading to 2.1.0 or running apt-get update resolves the issue.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#31 feat: charmcraft actions craft-actions merged Merged changes adding two GitHub Actions: charmcraft/setup installs Charmcraft and LXD, while charmcraft/pack builds charms. Approved by two reviewers with passing CI checks, the update adds 299 lines across six files to streamline workflows.
74%
#1104 charmcraft pack on Ubuntu 23.04 (Lunar) fails. charmcraft closed Charmcraft pack failed on Ubuntu 23.04 due to unavailable build environments. PR #1130 addressed the issue but was blocked by an external cloud-images bug. The issue was closed pending upstream resolution.
71%
#1990 Cannot stage packages with charmcraft charmcraft open stage-packages in charmcraft.yaml fails with apt method driver error on ubuntu@24.04 base. Maintainer triaged as blocked by #1839 and #1844; reporter has workaround via apt operator library. Internal Jira CRAFT-4393 created. No activity since Jan 2026.
71%
#724 Charmcraft fails to pack within Github runner using `--destructive-mode` charmcraft closed Closed without a fix. Maintainer clarified destructive mode requires sudo or preinstalled dependencies by design. The LXD hang was attributed to the GitHub Actions workflow, not charmcraft, and advised filing separately if it persists.
70%