Skip to content

Commit

Permalink
fix: media-types are fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
rchincha committed Dec 4, 2024
1 parent bf3be76 commit 9b9e659
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,6 @@ require (

replace (
github.com/opencontainers/umoci => github.com/project-stacker/umoci v0.0.0-20240906174318-e9397ba4ced0
machinerun.io/atomfs => github.com/rchincha/atomfs v0.0.0-20241202055124-ec75088f9adc
machinerun.io/atomfs => github.com/rchincha/atomfs v0.0.0-20241204024552-68b03282581c
stackerbuild.io/stacker-bom => github.com/project-stacker/stacker-bom v0.0.0-20240509203427-4d685e046780
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,8 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/rchincha/atomfs v0.0.0-20241202055124-ec75088f9adc h1:gMkzDlZoVwZia1hxClVziZkxs4YS59kWEmxnT3TKfR4=
github.com/rchincha/atomfs v0.0.0-20241202055124-ec75088f9adc/go.mod h1:woheEy3EVXE+AFLGwmBRSMtmcOKBM71qiDEYaq7Nwng=
github.com/rchincha/atomfs v0.0.0-20241204024552-68b03282581c h1:bZ5FHJXuXq02Zz0Kn9WYEsIl34GB/zO+K96FqFQ9ii0=
github.com/rchincha/atomfs v0.0.0-20241204024552-68b03282581c/go.mod h1:woheEy3EVXE+AFLGwmBRSMtmcOKBM71qiDEYaq7Nwng=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
Expand Down
12 changes: 6 additions & 6 deletions pkg/types/layer_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,20 @@ func NewLayerTypeManifest(manifest ispec.Manifest) (LayerType, error) {
case squashfs.BaseMediaTypeLayerSquashfs:
// older stackers generated media types without compression information
fallthrough
case squashfs.GenerateSquashfsMediaType(squashfs.GzipCompression, verity.VerityMetadataMissing):
case squashfs.GenerateSquashfsMediaType(squashfs.GzipCompression):
fallthrough
case squashfs.GenerateSquashfsMediaType(squashfs.ZstdCompression, verity.VerityMetadataMissing):
case squashfs.GenerateSquashfsMediaType(squashfs.ZstdCompression):
return NewLayerType("squashfs", verity.VerityMetadataMissing)
case squashfs.GenerateSquashfsMediaType(squashfs.GzipCompression, verity.VerityMetadataPresent):
case squashfs.GenerateSquashfsMediaType(squashfs.GzipCompression):
fallthrough
case squashfs.GenerateSquashfsMediaType(squashfs.ZstdCompression, verity.VerityMetadataPresent):
case squashfs.GenerateSquashfsMediaType(squashfs.ZstdCompression):
return NewLayerType("squashfs", verity.VerityMetadataPresent)
case erofs.BaseMediaTypeLayerErofs:
// older stackers generated media types without compression information
fallthrough
case erofs.GenerateErofsMediaType(erofs.LZ4HCCompression, verity.VerityMetadataMissing):
case erofs.GenerateErofsMediaType(erofs.LZ4HCCompression):
return NewLayerType("erofs", verity.VerityMetadataMissing)
case erofs.GenerateErofsMediaType(erofs.LZ4HCCompression, verity.VerityMetadataPresent):
case erofs.GenerateErofsMediaType(erofs.LZ4HCCompression):
return NewLayerType("erofs", verity.VerityMetadataPresent)
case ispec.MediaTypeImageLayerGzip:
fallthrough
Expand Down

0 comments on commit 9b9e659

Please sign in to comment.