The partial organize operations of parts are missing
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
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
No evaluation history available.