Changing from basefull to baseless silently produces an incomplete rock
Metadata
Current evaluation
Switching from basefull to baseless without cleaning silently produces incomplete rocks missing 520 files from the previous base
Suggested action: needs triage
Reason: This is a well-documented bug with clear reproduction steps showing stale state reuse when changing bases without cleaning, but it has no maintainer response, labels, or assignee after 8 days. The issue requires triage to confirm the bug and prioritize a fix for this silent data loss.
Impact:
75
Quick Win:
33.75
Staleness:
15
Complexity:
55
Confidence:
75
Support Request:
10
Issue body
### Check existing issues
- [x] I've verified that this bug isn't described by any existing issues.
### Bug description
Found together with @alesancor1
Rebuilding the same project after switching `base: ubuntu@26.04` to `base: bare` reuses stale state and packs a rock **silently** missing every file the previous base had provided.
### Steps to reproduce
```bash
mkdir my-test-rock && cd my-test-rock
# Two projects differing only in the base.
cat > ubuntu-base.yaml <<'EOF'
name: python
base: ubuntu@26.04
version: "3.14"
summary: Python3.14 rock
description: Example of a Python rock
license: Python-2.0
platforms:
amd64:
run-user: _daemon_
parts:
install-python:
plugin: nil
stage-packages:
- base-files
- python3.14
EOF
sed -e 's/^base: ubuntu@26.04$/base: bare\nbuild-base: ubuntu@26.04/' \
ubuntu-base.yaml > bare-base.yaml
# 1. Build with the Ubuntu base.
cp ubuntu-base.yaml rockcraft.yaml
rockcraft pack
mv python_3.14_amd64.rock 1-ubuntu.rock
# 2. Swap to the bare base and rebuild WITHOUT cleaning. This succeeds.
cp bare-base.yaml rockcraft.yaml
rockcraft pack
mv python_3.14_amd64.rock 2-bare-no-clean.rock
# 3. Reference: the same bare project, built clean.
rockcraft clean
rockcraft pack
mv python_3.14_amd64.rock 3-bare-clean.rock
# 4. Compare the two bare rocks. They should be identical; they are not.
list_rootfs() {
d=$(mktemp -d)
mkdir -p "$d/oci" "$d/fs"
tar -xf "$1" -C "$d/oci"
for l in $(find "$d/oci/blobs" -type f -size +100k); do
tar -xzf "$l" -C "$d/fs" 2>/dev/null || tar -xf "$l" -C "$d/fs" 2>/dev/null || true
done
(cd "$d/fs" && find . | LC_ALL=C sort)
rm -rf "$d"
}
list_rootfs 2-bare-no-clean.rock > no-clean.txt
list_rootfs 3-bare-clean.rock > clean.txt
wc -l no-clean.txt clean.txt
comm -13 no-clean.txt clean.txt # files the no-clean build is missing
```
Step 2 exits 0 with no warning, but `2-bare-no-clean.rock` is a strict subset of `3-bare-clean.rock`, missing 520 files -- all of `base-files` and friends.
### Environment
- Rockcraft 1.20.0 (snap, `latest/stable`, classic)
- LXD provider, **not** destructive mode
- Host: Ubuntu 24.04.4 LTS, amd64 (itself running as an LXD VM, but that does not matter. @alesancor1 reproduced this on metal host)
- Build base: `ubuntu@26.04`, amd64
### rockcraft.yaml
```yaml
name: python
base: ubuntu@26.04
version: "3.14"
summary: Python3.14 rock
description: Example of a Python rock
license: Python-2.0
platforms:
amd64:
run-user: _daemon_
parts:
install-python:
plugin: nil
stage-packages:
- base-files
- python3.14
```
### Log output
```shell
n/a
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
75
Quick Win:
33.75
Staleness:
15
Complexity:
55
Confidence:
75
Support Request:
10
|
needs triage | Switching from basefull to baseless without cleaning silently produces incomplete rocks missing 520 files from the previous base | |
| qwen/qwen3.8-27b |
Impact:
80
Quick Win:
28.0
Staleness:
5
Complexity:
65
Confidence:
70
Support Request:
5
|
needs triage | Rockcraft 1.20.0 silently packs an incomplete rock when switching base from ubuntu@26.04 to bare without cleaning, reusing stale state and dropping 520 files (all of base-files). Freshly filed, no maintainer activity yet. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
No related issues found above the similarity threshold.