{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/rocket/pulls/comments/22891357","id":22891357,"diff_hunk":"@@ -72,3 +77,25 @@ func decompress(rs io.Reader, typ aci.FileType) (io.Reader, error) {\n \t}\n \treturn dr, nil\n }\n+\n+// ExtractImageManifest returns, given the blockStore key, the\n+// schema.ImageManifest of an ACI\n+func ExtractImageManifest(key string, ds *Store) (*schema.ImageManifest, error) {\n+\trs, err := ds.ReadStream(key)\n+\tdefer rs.Close()\n+\tif err != nil {\n+\t\treturn nil, fmt.Errorf(\"error extracting ImageManifest: %v\", err)\n+\t}\n+\n+\timb, err := ptar.ExtractFileFromTar(tar.NewReader(rs), \"manifest\")","path":"cas/utils.go","position":35,"original_position":35,"commit_id":"07df526b92c3d068942a1352dd9e45ef99970bd3","original_commit_id":"07df526b92c3d068942a1352dd9e45ef99970bd3","user":{"login":"kelseyhightower","id":1123322,"avatar_url":"https://avatars.githubusercontent.com/u/1123322?v=3","gravatar_id":"","url":"https://api.github.com/users/kelseyhightower","html_url":"https://github.com/kelseyhightower","followers_url":"https://api.github.com/users/kelseyhightower/followers","following_url":"https://api.github.com/users/kelseyhightower/following{/other_user}","gists_url":"https://api.github.com/users/kelseyhightower/gists{/gist_id}","starred_url":"https://api.github.com/users/kelseyhightower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelseyhightower/subscriptions","organizations_url":"https://api.github.com/users/kelseyhightower/orgs","repos_url":"https://api.github.com/users/kelseyhightower/repos","events_url":"https://api.github.com/users/kelseyhightower/events{/privacy}","received_events_url":"https://api.github.com/users/kelseyhightower/received_events","type":"User","site_admin":false},"body":"Can we use aci.ManifestFromImage here:\r\n https://github.com/appc/spec/blob/master/aci/file.go#L112","created_at":"2015-01-13T20:20:33Z","updated_at":"2015-01-13T20:20:33Z","html_url":"https://github.com/coreos/rocket/pull/351#discussion_r22891357","pull_request_url":"https://api.github.com/repos/coreos/rocket/pulls/351","_links":{"self":{"href":"https://api.github.com/repos/coreos/rocket/pulls/comments/22891357"},"html":{"href":"https://github.com/coreos/rocket/pull/351#discussion_r22891357"},"pull_request":{"href":"https://api.github.com/repos/coreos/rocket/pulls/351"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/rocket/pulls/351","id":27110562,"html_url":"https://github.com/coreos/rocket/pull/351","diff_url":"https://github.com/coreos/rocket/pull/351.diff","patch_url":"https://github.com/coreos/rocket/pull/351.patch","issue_url":"https://api.github.com/repos/coreos/rocket/issues/351","number":351,"state":"open","locked":false,"title":"cas: add a function to extract the image manifest from an image in the store.","user":{"login":"sgotti","id":1690273,"avatar_url":"https://avatars.githubusercontent.com/u/1690273?v=3","gravatar_id":"","url":"https://api.github.com/users/sgotti","html_url":"https://github.com/sgotti","followers_url":"https://api.github.com/users/sgotti/followers","following_url":"https://api.github.com/users/sgotti/following{/other_user}","gists_url":"https://api.github.com/users/sgotti/gists{/gist_id}","starred_url":"https://api.github.com/users/sgotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgotti/subscriptions","organizations_url":"https://api.github.com/users/sgotti/orgs","repos_url":"https://api.github.com/users/sgotti/repos","events_url":"https://api.github.com/users/sgotti/events{/privacy}","received_events_url":"https://api.github.com/users/sgotti/received_events","type":"User","site_admin":false},"body":"Last commit is the interesting one. \r\n\r\nThe previous required commit was proposed in #350 ","created_at":"2015-01-09T16:23:18Z","updated_at":"2015-01-13T20:20:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5374d0495ac7f49fc1ddf034f33aa2e601f2900","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/coreos/rocket/pulls/351/commits","review_comments_url":"https://api.github.com/repos/coreos/rocket/pulls/351/comments","review_comment_url":"https://api.github.com/repos/coreos/rocket/pulls/comments/{number}","comments_url":"https://api.github.com/repos/coreos/rocket/issues/351/comments","statuses_url":"https://api.github.com/repos/coreos/rocket/statuses/07df526b92c3d068942a1352dd9e45ef99970bd3","head":{"label":"sgotti:extractim","ref":"extractim","sha":"07df526b92c3d068942a1352dd9e45ef99970bd3","user":{"login":"sgotti","id":1690273,"avatar_url":"https://avatars.githubusercontent.com/u/1690273?v=3","gravatar_id":"","url":"https://api.github.com/users/sgotti","html_url":"https://github.com/sgotti","followers_url":"https://api.github.com/users/sgotti/followers","following_url":"https://api.github.com/users/sgotti/following{/other_user}","gists_url":"https://api.github.com/users/sgotti/gists{/gist_id}","starred_url":"https://api.github.com/users/sgotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgotti/subscriptions","organizations_url":"https://api.github.com/users/sgotti/orgs","repos_url":"https://api.github.com/users/sgotti/repos","events_url":"https://api.github.com/users/sgotti/events{/privacy}","received_events_url":"https://api.github.com/users/sgotti/received_events","type":"User","site_admin":false},"repo":{"id":27428376,"name":"rocket","full_name":"sgotti/rocket","owner":{"login":"sgotti","id":1690273,"avatar_url":"https://avatars.githubusercontent.com/u/1690273?v=3","gravatar_id":"","url":"https://api.github.com/users/sgotti","html_url":"https://github.com/sgotti","followers_url":"https://api.github.com/users/sgotti/followers","following_url":"https://api.github.com/users/sgotti/following{/other_user}","gists_url":"https://api.github.com/users/sgotti/gists{/gist_id}","starred_url":"https://api.github.com/users/sgotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgotti/subscriptions","organizations_url":"https://api.github.com/users/sgotti/orgs","repos_url":"https://api.github.com/users/sgotti/repos","events_url":"https://api.github.com/users/sgotti/events{/privacy}","received_events_url":"https://api.github.com/users/sgotti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sgotti/rocket","description":"App Container runtime","fork":true,"url":"https://api.github.com/repos/sgotti/rocket","forks_url":"https://api.github.com/repos/sgotti/rocket/forks","keys_url":"https://api.github.com/repos/sgotti/rocket/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sgotti/rocket/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sgotti/rocket/teams","hooks_url":"https://api.github.com/repos/sgotti/rocket/hooks","issue_events_url":"https://api.github.com/repos/sgotti/rocket/issues/events{/number}","events_url":"https://api.github.com/repos/sgotti/rocket/events","assignees_url":"https://api.github.com/repos/sgotti/rocket/assignees{/user}","branches_url":"https://api.github.com/repos/sgotti/rocket/branches{/branch}","tags_url":"https://api.github.com/repos/sgotti/rocket/tags","blobs_url":"https://api.github.com/repos/sgotti/rocket/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sgotti/rocket/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sgotti/rocket/git/refs{/sha}","trees_url":"https://api.github.com/repos/sgotti/rocket/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sgotti/rocket/statuses/{sha}","languages_url":"https://api.github.com/repos/sgotti/rocket/languages","stargazers_url":"https://api.github.com/repos/sgotti/rocket/stargazers","contributors_url":"https://api.github.com/repos/sgotti/rocket/contributors","subscribers_url":"https://api.github.com/repos/sgotti/rocket/subscribers","subscription_url":"https://api.github.com/repos/sgotti/rocket/subscription","commits_url":"https://api.github.com/repos/sgotti/rocket/commits{/sha}","git_commits_url":"https://api.github.com/repos/sgotti/rocket/git/commits{/sha}","comments_url":"https://api.github.com/repos/sgotti/rocket/comments{/number}","issue_comment_url":"https://api.github.com/repos/sgotti/rocket/issues/comments/{number}","contents_url":"https://api.github.com/repos/sgotti/rocket/contents/{+path}","compare_url":"https://api.github.com/repos/sgotti/rocket/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sgotti/rocket/merges","archive_url":"https://api.github.com/repos/sgotti/rocket/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sgotti/rocket/downloads","issues_url":"https://api.github.com/repos/sgotti/rocket/issues{/number}","pulls_url":"https://api.github.com/repos/sgotti/rocket/pulls{/number}","milestones_url":"https://api.github.com/repos/sgotti/rocket/milestones{/number}","notifications_url":"https://api.github.com/repos/sgotti/rocket/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sgotti/rocket/labels{/name}","releases_url":"https://api.github.com/repos/sgotti/rocket/releases{/id}","created_at":"2014-12-02T10:56:31Z","updated_at":"2014-12-02T10:56:31Z","pushed_at":"2015-01-13T12:04:21Z","git_url":"git://github.com/sgotti/rocket.git","ssh_url":"git@github.com:sgotti/rocket.git","clone_url":"https://github.com/sgotti/rocket.git","svn_url":"https://github.com/sgotti/rocket","homepage":"","size":1611,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coreos:master","ref":"master","sha":"6297c5cd1dce2829c2922068065c422192f6e46e","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":26509369,"name":"rocket","full_name":"coreos/rocket","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/rocket","description":"App Container runtime","fork":false,"url":"https://api.github.com/repos/coreos/rocket","forks_url":"https://api.github.com/repos/coreos/rocket/forks","keys_url":"https://api.github.com/repos/coreos/rocket/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/rocket/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/rocket/teams","hooks_url":"https://api.github.com/repos/coreos/rocket/hooks","issue_events_url":"https://api.github.com/repos/coreos/rocket/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/rocket/events","assignees_url":"https://api.github.com/repos/coreos/rocket/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/rocket/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/rocket/tags","blobs_url":"https://api.github.com/repos/coreos/rocket/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/rocket/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/rocket/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/rocket/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/rocket/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/rocket/languages","stargazers_url":"https://api.github.com/repos/coreos/rocket/stargazers","contributors_url":"https://api.github.com/repos/coreos/rocket/contributors","subscribers_url":"https://api.github.com/repos/coreos/rocket/subscribers","subscription_url":"https://api.github.com/repos/coreos/rocket/subscription","commits_url":"https://api.github.com/repos/coreos/rocket/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/rocket/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/rocket/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/rocket/issues/comments/{number}","contents_url":"https://api.github.com/repos/coreos/rocket/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/rocket/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/rocket/merges","archive_url":"https://api.github.com/repos/coreos/rocket/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/rocket/downloads","issues_url":"https://api.github.com/repos/coreos/rocket/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/rocket/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/rocket/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/rocket/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/rocket/labels{/name}","releases_url":"https://api.github.com/repos/coreos/rocket/releases{/id}","created_at":"2014-11-11T23:13:18Z","updated_at":"2015-01-13T20:17:35Z","pushed_at":"2015-01-13T20:17:35Z","git_url":"git://github.com/coreos/rocket.git","ssh_url":"git@github.com:coreos/rocket.git","clone_url":"https://github.com/coreos/rocket.git","svn_url":"https://github.com/coreos/rocket","homepage":"","size":4919,"stargazers_count":3131,"watchers_count":3131,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":214,"mirror_url":null,"open_issues_count":53,"forks":214,"open_issues":53,"watchers":3131,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/rocket/pulls/351"},"html":{"href":"https://github.com/coreos/rocket/pull/351"},"issue":{"href":"https://api.github.com/repos/coreos/rocket/issues/351"},"comments":{"href":"https://api.github.com/repos/coreos/rocket/issues/351/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/rocket/pulls/351/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/rocket/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/coreos/rocket/pulls/351/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/rocket/statuses/07df526b92c3d068942a1352dd9e45ef99970bd3"}}}}