Closed valentincanonical closed 2 years ago
This might be related to the recently closed #44 (given the root cause for it)
The layer flattener is not removing unnecessary whiteout files after the package cache layer is removed. This can be fixed tracking whiteout files in each layer and verifying if there's an underlying file to be whited out.
For issue 2, I think #44 did fix this. I created a new image with a /etc/newfiles
dir and I can collapse/expand normally:
Not sure about issue 1, though. Is there an easy way to repro?
I reproduced the dive error using the rockcraft tutorial yaml. Problems were caused by dangling whiteout files after the layer containing files to be whited out were removed from the layer stack. A final pass now removes the dangling whiteouts, this fix is available in craft-parts 1.13.0.
Referring to the https://github.com/wagoodman/dive tool to explore the content of an image, once imported in the local docker registry.
I noticed two different situations,
1) As discussed before, sometimes Dive will simply fail to open the image. This seems related to the use of whiteout files and a wrong interpretation of the OCI spec on their end.
2) But even when Dive will open the image and explore it, it is not possible to collapse the directories (hitting Space or Ctrl+Space). This only happened to me with images built using Rockcraft.