Skip to content

image: slash separation between algo and hash#230

Merged
philips merged 1 commit intoopencontainers:masterfrom
runcom:colon-to-slash
Sep 1, 2016
Merged

image: slash separation between algo and hash#230
philips merged 1 commit intoopencontainers:masterfrom
runcom:colon-to-slash

Conversation

@runcom
Copy link
Member

@runcom runcom commented Aug 31, 2016

Fix up oci-image-tool to look for hashes under blobs/{algo} as per #208

This isn't addressing any language change required

$ tree 
.
├── blobs
│   └── sha256
│       ├── 086acbc3376eedf5a3d9c969a0d446e803600091f133288e8f5643a46e801976
│       ├── 98b338c114d348c417532b8a3bafd364f5d0c8f3541c01d0652e7c043d7d9056
│       └── bc6eb737e26b988486a6e8d5ac29167ae7aaaae7ba98fac406e4722a4eb219bb
├── oci-layout
└── refs
    └── latest

3 directories, 5 files

$ oci-image-tool validate --ref latest .                                                             
.: OK # nevermind here, I just noticed it and I have plan to fix this up :) net is that tests pass

Signed-off-by: Antonio Murdaca runcom@redhat.com

@runcom
Copy link
Member Author

runcom commented Aug 31, 2016

digest, err := filepath.Rel("blobs", filepath.Clean(path))
if err != nil || d.normalizeDigest() != digest {
digest, err := filepath.Rel(filepath.Join("blobs", d.algo()), filepath.Clean(path))
if err != nil || d.hash() != digest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“Digest” is algo + hash. Can we call the digest variable filename or something to avoid confusing folks by comparing it to d.hash()?

@philips
Copy link
Contributor

philips commented Sep 1, 2016

Please fix wking's issue and then LGTM from me.

@stevvooe
Copy link
Contributor

stevvooe commented Sep 1, 2016

LGTM after merge of #232

Approved with PullApprove

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
@runcom
Copy link
Member Author

runcom commented Sep 1, 2016

@philips fixed wking's comment

@jonboulle
Copy link
Contributor

jonboulle commented Sep 1, 2016

LGTM

Approved with PullApprove

@philips
Copy link
Contributor

philips commented Sep 1, 2016

LGTM

Approved with PullApprove

@philips philips merged commit bc6a287 into opencontainers:master Sep 1, 2016
@runcom runcom deleted the colon-to-slash branch September 1, 2016 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants