← Back to issue list

The partial organize operations of parts are missing

View original Github issue

Metadata

Project
snapcraft
Number
#4697
Type
issue
State
open
Author
LaiderLai
Labels
Status: Needs information
Created
Updated
Closed
—

Current evaluation

Organize globs using ${SNAPCRAFT_ARCH_TRIPLET} silently matched nothing on core20 cross-builds because the variable resolved to the host triplet; root cause fixed pre-8.0.0 by #4313, core20 since dropped

Suggested action: close resolved

Reason: The root cause (SNAPCRAFT_ARCH_TRIPLET resolving to the host rather than build-for arch, so `files/lib/${SNAPCRAFT_ARCH_TRIPLET}/*` expanded to a non-existent path while literal rules like `files/sbin/*` still matched) was fixed by commit 93a9d8170 (#4313), which added core20 build-on/build-for env vars so the triplet reflects the target arch — the same commit recorded as the fix for Launchpad bug 1997752, and hardened by #4332. Both shipped before 8.0.0, and fa7952b4d (#6019) subsequently dropped core20 entirely, so the reported reproduction can no longer be exercised. Confidence is moderated because the reporter never answered @mr-cal's 'is this still a problem in Snapcraft 8?' and the 'Needs information' label was never cleared, so there is no user-side confirmation.

Evaluated by: mr-cal-bot

Impact: 40 Quick Win: 15 Complexity: 30 Confidence: 70 Actionability: 55

Issue body

### Bug Description Hi, We found partial 'organize' operations of 'parts' are missing when snapcraft build command works w/o "--target-arch=arm64 --enable-experimental-target-arch" Please reference the attached snapcraft.yaml example. The 'files/sbin/*: files/usr/bin' operation always move 'files/sbin/partprobe' to 'files/usr/bin' correctly. But 'files/lib/${SNAPCRAFT_ARCH_TRIPLET}/*: files/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}' operation always miss to move libparted.so* and libreadline.so* files from 'files/lib/aarch64-linux-gnu' to 'files/usr/lib/aarch64-linux-gnu'. The interesting part is if we execute snapcraft with "--target-arch=arm64 --enable-experimental-target-arch" parameters, the library files are moved to the target directory correctly. But we should not use these parameters after snapcraft 7.x Could you help to check this behavior? Tks. ### To Reproduce [Env] An Ubuntu 20.04 LTS server and install snapcraft tool [Steps] Failed result with this build command: snapcraft --destructive-mode --enable-manifest Passed result with this build command: snapcraft --destructive-mode --target-arch=arm64 --enable-experimental-target-arch --enable-manifest ### Environment Ubuntu 20.04 LTS ### snapcraft.yaml ```shell name: test base: core20 summary: test version: '1.0' description: | This snap is used to test grade: devel confinement: devmode architectures: - build-on: [amd64, arm64] run-on: arm64 parts: copy-files: source: . plugin: dump stage-packages: - jq:arm64 - libreadline8:arm64 - libjq1:arm64 - libparted2:arm64 - parted:arm64 organize: '*': files/ files/sbin/*: files/usr/bin files/lib/${SNAPCRAFT_ARCH_TRIPLET}/*: files/usr/lib/${SNAPCRAFT_ARCH_TRIPLET} stage: - files/usr/bin/jq - files/usr/bin/partprobe - files/usr/lib/aarch64-linux-gnu/libjq.so* - files/usr/lib/aarch64-linux-gnu/libparted.so* - files/usr/lib/aarch64-linux-gnu/libreadline.so* build-packages: - gcc - on amd64: - gcc-aarch64-linux-gnu - libc6-dev-arm64-cross ``` ### Relevant log output ```shell Failed result: $ tree prime/files/ prime/files/ └── usr ├── bin │   ├── jq │   └── partprobe └── lib └── aarch64-linux-gnu ├── libjq.so.1 -> libjq.so.1.0.4 └── libjq.so.1.0.4 Passed result with "--target-arch=arm64 --enable-experimental-target-arch" $ tree prime/files/ prime/files/ └── usr ├── bin │   ├── jq │   └── partprobe └── lib └── aarch64-linux-gnu ├── libjq.so.1 -> libjq.so.1.0.4 ├── libjq.so.1.0.4 ├── libparted.so.2 -> libparted.so.2.0.2 ├── libparted.so.2.0.2 ├── libreadline.so.8 -> libreadline.so.8.0 └── libreadline.so.8.0 ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 40
Quick Win: 15
Complexity: 30
Confidence: 70
Actionability: 55
close resolved Organize globs using ${SNAPCRAFT_ARCH_TRIPLET} silently matched nothing on core20 cross-builds because the variable resolved to the host triplet; root cause fixed pre-8.0.0 by #4313, core20 since dropped
qwen/qwen3.6-35b-a3b
Impact: 70
Quick Win: 29
Complexity: 40
Confidence: 75
Actionability: 70
keep open organize glob patterns with ${SNAPCRAFT_ARCH_TRIPLET} fail to match files without experimental target-arch flags; maintainer asked if issue persists in Snapcraft 8
qwen/qwen3.8-27b
Impact: 35
Quick Win: 19
Staleness: 78
Complexity: 45
Confidence: 72
Support Request: 10
close stale Core20 cross-arch build: organize with ${SNAPCRAFT_ARCH_TRIPLET} misses files without --target-arch flag. Maintainer asked in Jan 2026 if still reproducible in Snapcraft 8; no response. Core20 has since been dropped.
qwen/qwen3.6-35b-a3b
Staleness: 70
Complexity: 60
Confidence: 85
Support Request: 10
close stale Missing library files during snapcraft organize operations when building without experimental target-arch flags. Awaiting reporter confirmation on whether the issue persists in Snapcraft 8.
qwen3.6-35b-a3b-mtp-q6
Staleness: 70
Complexity: 60
Confidence: 75
Support Request: 10
keep open Snapcraft organize operations fail to move specific library files during amd64 builds without experimental target-arch flags. Issue is currently awaiting author response to a maintainer's question about Snapcraft 8.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcraft#4313 (confidence 88%)

    Commit 93a9d8170 added build-on/build-for arch env vars for core20 so SNAPCRAFT_ARCH_TRIPLET reflects the target arch instead of the host — directly addresses the reported mismatch.

  • Related To: snapcraft (launchpad)#1997752 (confidence 85%)

    Launchpad bug 'base core20: wrong arch triplet' — same defect, closed citing PR #4313 / commit 93a9d8170.

  • Superseded By: snapcraft#6019 (confidence 75%)

    Commit fa7952b4d dropped core20 support; the 8.0.0 changelog designates SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR as the superseding variable, making the core20 repro obsolete.

  • Related To: snapcraft#4332 (confidence 70%)

    Commit 48bd0632f made unevaluable build-for arch variables a hard error instead of silently expanding to the wrong triplet.

  • Related To: snapcraft#4486 (confidence 55%)

    Same class of bug for the core22 variable ($CRAFT_ARCH_TRIPLET_BUILD_FOR), resolved in Snapcraft 8 — shows the pattern of triplet-variable failures across bases.

Related issues

No related issues found above the similarity threshold.