← 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

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.

Suggested action: close stale

Reason: Maintainer @mr-cal asked on 2026-01-27 whether the issue persists in Snapcraft 8 and received no response for ~7 months. Additionally, the affected base (core20) has been dropped from the project (commit fa7952b4d, #6019), and Snapcraft 8.0.0 introduced SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR to supersede the ambiguous SNAPCRAFT_ARCH_TRIPLET variable, making the original reproduction path no longer applicable.

Impact: 35 Quick Win: 19.25 Staleness: 78 Complexity: 45 Confidence: 72 Support Request: 10

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
qwen/qwen3.8-27b
Impact: 35
Quick Win: 19.25
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 60
Complexity: 45
Confidence: 80
Support Request: 15
keep open snapcraft organize directives fail to relocate specific library files unless --target-arch=arm64 --enable-experimental-target-arch is used. Labeled needs information, awaiting confirmation if the issue persists in Snapcraft 8.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft/snapcraft#6019 (confidence 85%)

    Core20 support dropped from the project, removing the base this issue targets.

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

    PR adding SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR / BUILD_ON envvars for core20, which supersedes the ambiguous SNAPCRAFT_ARCH_TRIPLET that caused the organize mismatch.

Related issues

Issue Project State Summary Similarity
#1997752 base core20: wrong arch triplet snapcraft (launchpad) closed Closed without a fix or resolution, likely abandoned due to inactivity. The report indicated Snapcraft incorrectly sets SNAPCRAFT_ARCH_TRIPLET when building on a mismatched host architecture. No comments or patches were submitted.
77%
#1973376 SNAPCRAFT_ARCH_TRIPLET not usable with core22 base snapcraft (launchpad) closed Closed without resolution. The report details a core22 build failure where snapcraft rejects SNAPCRAFT_ARCH_TRIPLET in layout mount points during packing. Core20 remains compatible.
75%
#1943603 snapcraft --target-arch=i386 does not build i386 images, because core20 does not support i386 and yet the build starts and wastes time snapcraft (launchpad) open Reports that snapcraft --target-arch=i386 on a core20 base silently builds an amd64 snap instead of failing early, wasting build time. Unlabelled, 0 comments, inactive ~5 years; a related core20/i386 bug was closed as superseded by improved arch parsing.
71%
#1807553 Snapcraft crashes when updating parts using organize key snapcraft (launchpad) open Snapcraft crashes with shutil.Error when a part's organize key maps a directory into its own subpath during non-clean rebuilds; no maintainer response, no labels, no reproducible steps, and the organize code has since been rewritten in craft-parts.
70%