← Back to issue list

fix(utils): only unsquash metadata files

View original Github issue

Metadata

Project
snapcraft
Number
#6235
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

PR #6235 (commit 52bc82495, SNAPCRAFT-1337) merged to main, making get_data_from_snap_file unsquash only meta/snap.yaml and snap/manifest.yaml, fixing upload/keys failures on snaps containing device nodes. Closes #6206.

Resolution: closed resolved

Reason: The PR was approved and merged into main as commit 52bc82495, restricting unsquash_snap to only the metadata files. utils.get_data_from_snap_file now passes extra_args=["meta/snap.yaml", "snap/manifest.yaml"], resolving the unsquashfs failures reported in canonical/snapcraft#6206.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Fixes the `get_data_from_snap_file` to only unsquash metadata files. This was an oversight when the upload command was [switched](https://github.com/canonical/snapcraft/commit/5864b582e495a4dd5778fda764b4023eb31304bc#diff-8d486fec1b7c44f763f9dba5efd65edbbedf4e3cb7386fb1b31e9dde23a78bb4R118) from the legacy [`get_data_from_snap_file`](https://github.com/canonical/snapcraft/blob/e02708489f0882cafde18b22bcfe90ddf226d13c/snapcraft_legacy/_store.py#L60-L66). Fixes #6206 (SNAPCRAFT-1337) ...heh, LEET --- - [x] I've followed the [contribution guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md). - [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [x] I've successfully run `make lint && make test`. - [ ] I've added or updated any relevant documentation. - [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing. - [ ] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved PR #6235 (commit 52bc82495, SNAPCRAFT-1337) merged to main, making get_data_from_snap_file unsquash only meta/snap.yaml and snap/manifest.yaml, fixing upload/keys failures on snaps containing device nodes. Closes #6206.
stealth/space-bunny-alpha — closed resolved Merged #6235 (52bc82495) to extract only metadata from snap files, fixing #6206 unsquashfs failures on snaps containing character devices.
qwen/qwen3.6-35b-a3b — — Merged fix for get_data_from_snap_file to only unsquash metadata files, correcting an oversight from a previous upload command refactor. Approved by reviewers and merged despite unrelated CI failures, resolving issue #6206.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Updated get_data_from_snap_file to only unsquash metadata files, correcting an oversight from the upload command migration. Closes #6206. Author noted unrelated test failures.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#6206 (confidence 97%)

    Bug report 'snapcraft fails to unsquashfs some snaps' is explicitly listed as Fixes in the PR body and closed by it.

  • Caused By: snapcraft#0 (confidence 40%)

    Regression introduced when upload switched from the legacy snapcraft_legacy/_store.py get_data_from_snap_file to the new utils implementation (commit 5864b582e4).

Related issues

Issue Project State Summary Similarity
#6206 snapcraft fails to unsquashfs some snaps snapcraft closed Fixed in canonical/snapcraft#6235 (commit 52bc82495), merged into main and planned for Snapcraft 9. Upload now unsquashes only snap.yaml and manifest.yaml, avoiding device-node errors.
77%