buildpacks / imgutil

Helpful utilities for working with images
Apache License 2.0
24 stars 41 forks source link

sparse: do not modify media type when unspecified #233

Closed jabrown85 closed 10 months ago

jabrown85 commented 11 months ago

The media type should only be modified when the user specifies it. In my case I noticed the digest given by the sparse.Image was not the same as the image it was dervied from. This was because the logic to set the media type defaulted to overriding to OCI if the media type was not specified. This commit changes the logic to only override the media type if the user specifies it.

jabrown85 commented 11 months ago

I don't think lifecycle is aware of sparse vs layout at all today and this should change nothing there.

jjbustamante commented 11 months ago

Are we going to need to change the lifecycle at all? Or should that be covered by "has base image"?

As I mentioned on Slack: