opencontainers / image-tools

OCI Image Tooling
https://opencontainers.org
Apache License 2.0
266 stars 83 forks source link

oci-image-tool commands ‘validate’ and ‘create’ failing for tar and zip images #205

Open knieriem opened 6 years ago

knieriem commented 6 years ago

Due to a change in rev. 9027d58 validating an image in a tar (or zip) file is failing currently with the following message:

<tar-image>: find failed: unable to walk: end of walk

This is because in the context of the transition from using w.walk to w.find in findManifest (and, similar, findConfig) which has been done in 9027d58, the interaction between walk/findFunc and error handling, especially regarding errEOW, appears not to have been adjusted accordingly.

I have created a patch https://github.com/knieriem/image-tools/commit/06a4e9658be3d997a601d6b13987459570227901 that describes in more detail what is happening, and adjusts how image.findManifest and image.findConfig interact with image.walker.find so that validate and create commands work again for tar and zip files.

zhouhao3 commented 6 years ago

@knieriem Can you push that patch to this community to solve this problem?