← Back to issue list

redundant whiteouts cause a path error

View original Github issue

Metadata

Project
rockcraft
Number
#30
Type
issue
State
open
Author
cjdcordeiro
Labels
—
Created
Updated
Closed
—

Current evaluation

Same-layer OCI whiteouts from package installation trigger path errors in tools such as Dive; the report remains open and has not been retested against current dependencies.

Suggested action: needs triage

Reason: The issue is unlabelled and has no authoritative resolution; a triage comment says archive_layer() archives the lifecycle filesystem and cannot determine whether each .wh.* entry has a lower-layer counterpart. Maintainers should obtain the current Rockcraft version and reproduction result, then determine whether filtering belongs in Rockcraft or craft-parts.

Evaluated by: mr-cal-bot

Impact: 55 Quick Win: 14 Complexity: 62 Confidence: 72 Actionability: 66

Issue body

## Problem When building an image where new packages are added (either via `stage-packages` or `overlay-packages`), the corresponding OCI layer will flag some of the underlying part's files to be whiteout. Not only this is redundant (because the introduction and deletion of the package files happen within the same part/layer), but it also causes a path error to some tools (like `dive`). In short, whiteout should only be used to flag **files from underlying layers** for deletion, but not files from the same layer. ## How to reproduce rockcraft.yaml: ``` name: hello version: "1.0" base: ubuntu:20.04 parts: hello: plugin: nil stage-packages: - hello ``` Then: ``` $ rockcraft pack ... $ skopeo copy oci-archive:hello_1.0.rock docker-daemon:test-image:latest $ dive test-image:latest Image Source: docker://test-image:latest Fetching image... (this can take a while for large images) Analyzing image... Building cache... path error at layer index Index(0:1): unable to remove '/usr/bin/hello.dpkg-new': path does not exist: /usr/bin/hello.dpkg-new path error at layer index Index(0:1): unable to remove '/usr/share/doc/hello.dpkg-new': path does not exist: /usr/share/doc/hello.dpkg-new path error at layer index Index(0:1): unable to remove '/usr/share/doc/hello/changelog.Debian.gz.dpkg-new': path does not exist: /usr/share/doc/hello/changelog.Debian.gz.dpkg-new path error at layer index Index(0:1): unable to remove '/usr/share/doc/hello/copyright.dpkg-new': path does not exist: /usr/share/doc/hello/copyright.dpkg-new path error at layer index Index(0:1): unable to remove '/usr/share/info/hello.info.gz.dpkg-new': path does not exist: /usr/share/info/hello.info.gz.dpkg-new path error at layer index Index(0:1): unable to remove '/var/cache/apt/archives/hello_2.10-2ubuntu2_amd64.deb': path does not exist: /var/cache/apt/archives/hello_2.10-2ubuntu2_amd64.deb path error at layer index Index(0:1): unable to remove '/var/lib/apt/extended_states.1NJeQR': path does not exist: /var/lib/apt/extended_states.1NJeQR path error at layer index Index(0:1): unable to remove '/var/lib/apt/extended_states.3b7RY9': path does not exist: /var/lib/apt/extended_states.3b7RY9 path error at layer index Index(0:1): unable to remove '/var/lib/dpkg/status-new': path does not exist: /var/lib/dpkg/status-new path error at layer index Index(0:1): unable to remove '/var/lib/dpkg/tmp.ci': path does not exist: /var/lib/dpkg/tmp.ci path error at layer index Index(0:1): unable to remove '/var/lib/dpkg/info/hello.list-new': path does not exist: /var/lib/dpkg/info/hello.list-new file tree has path errors ``` ### Origin of the problem The new layer created by the rockcraft part has all of the whiteout files listed in the `dive` error above. This can be confirmed by: ``` $ skopeo copy oci-archive:hello_1.0.rock oci:test-image $ ls -l test-image/blobs/sha256/ total 33824 -rw-r--r-- 1 cris cris 508 Apr 25 10:12 8a023a80af56db32c245ed2fb0a542eb44ceabc24695abcf26a9d9a8095689a3 -rw-r--r-- 1 cris cris 6033508 Apr 25 10:12 8a9350d62b7b6564badccbd007a354a6eab0ddf7aeb1006b5692e179d2e244e8 -rw-r--r-- 1 cris cris 28565998 Apr 25 10:12 8e5c1b329fe39c318c0d49821b339fb94a215c5dc0a2898c8030b5a4d091bcba -rw-r--r-- 1 cris cris 734 Apr 25 10:12 e41e5ca3f81a4dadba93d0fd71f2ee8c3ef693620933b65b0d325fb490162370 $ $ tar tf test-image/blobs/sha256/8a9350d62b7b6564badccbd007a354a6eab0ddf7aeb1006b5692e179d2e244e8 | grep wh ./var/cache/apt/archives/.wh.hello_2.10-2ubuntu2_amd64.deb ./var/lib/dpkg/.wh.status-new ./var/lib/dpkg/.wh.tmp.ci ./var/lib/dpkg/info/.wh.hello.list-new ./var/lib/apt/.wh.extended_states.3b7RY9 ./var/lib/apt/.wh.extended_states.1NJeQR ./usr/bin/.wh.hello.dpkg-new ./usr/share/doc/.wh.hello.dpkg-new ./usr/share/doc/hello/.wh..wh..opq ./usr/share/doc/hello/.wh.changelog.Debian.gz.dpkg-new ./usr/share/doc/hello/.wh.copyright.dpkg-new ./usr/share/info/.wh.hello.info.gz.dpkg-new ``` These whiteout files do not exist in layer 8e5c1b329fe39c318c0d49821b339fb94a215c5dc0a2898c8030b5a4d091bcba, and thus the whiteout is redundant.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 55
Quick Win: 14
Complexity: 62
Confidence: 72
Actionability: 66
needs triage Same-layer OCI whiteouts from package installation trigger path errors in tools such as Dive; the report remains open and has not been retested against current dependencies.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 19
Complexity: 20
Confidence: 90
Actionability: 80
close resolved Redundant OCI whiteout entries in Rockcraft layers causing path errors in tools like dive. Fixed upstream in craft-parts PR #274 (ea2f679a) and included in Rockcraft's craft-parts 1.13.0+ dependency.
qwen/qwen3.8-27b
Impact: 40
Quick Win: 24
Staleness: 55
Complexity: 40
Confidence: 70
Support Request: 10
close stale Redundant OCI whiteout entries in rockcraft layers cause path errors in tools like dive. Fix appears implemented in craft-parts via filter_dangling_whiteouts; issue open since 2022 with recent triage asking for re-test, no response yet.
qwen/qwen3.6-35b-a3b
Staleness: 80
Complexity: 55
Confidence: 65
Support Request: 10
needs triage Unlabelled report of redundant OCI whiteout files in rockcraft layers causing tool errors. Open ~4 years with no maintainer response; contributor suspects upstream craft-parts issue but lacks verification.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 30
Confidence: 85
Support Request: 20
close stale Redundant OCI whiteout files in Rockcraft layers cause path errors in tools like dive. Analysis points to craft-parts as the source. Open for years despite author requesting closure, causing contributor confusion.

Update history

No update history recorded yet.

Related work

  • Related To: rockcraft#163 (confidence 75%)

    Commit 501e6eae handles opaque-whiteout directory behavior for usrmerge, but does not demonstrate removal of redundant same-layer package whiteouts.

Related issues

No related issues found above the similarity threshold.