{"action":"created","comment":{"url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments/58357100","id":58357100,"diff_hunk":"@@ -224,3 +228,20 @@ func (m *SnapManager) Wait() {\n func (m *SnapManager) Stop() {\n \tm.runner.Stop()\n }\n+\n+// SnapInfo returns snap.Info for a given snap name and snap version.\n+func SnapInfo(state *state.State, snapName, snapVersion string) (*snap.Info, error) {","path":"overlord/snapstate/snapmgr.go","position":22,"original_position":22,"commit_id":"7f7838f34fcce9db87de203a9f5783e1ff1e712a","original_commit_id":"02c66411ade78345d27f74d7ea0d3a83fbde2edf","user":{"login":"stevenwilkin","id":45121,"avatar_url":"https://avatars.githubusercontent.com/u/45121?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenwilkin","html_url":"https://github.com/stevenwilkin","followers_url":"https://api.github.com/users/stevenwilkin/followers","following_url":"https://api.github.com/users/stevenwilkin/following{/other_user}","gists_url":"https://api.github.com/users/stevenwilkin/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenwilkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenwilkin/subscriptions","organizations_url":"https://api.github.com/users/stevenwilkin/orgs","repos_url":"https://api.github.com/users/stevenwilkin/repos","events_url":"https://api.github.com/users/stevenwilkin/events{/privacy}","received_events_url":"https://api.github.com/users/stevenwilkin/received_events","type":"User","site_admin":false},"body":"Ok. Maybe a mention of this in the docstring would be an idea.","created_at":"2016-04-04T10:40:56Z","updated_at":"2016-04-04T10:40:56Z","html_url":"https://github.com/ubuntu-core/snappy/pull/778#discussion_r58357100","pull_request_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/778","_links":{"self":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments/58357100"},"html":{"href":"https://github.com/ubuntu-core/snappy/pull/778#discussion_r58357100"},"pull_request":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/778"}}},"pull_request":{"url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/778","id":65121537,"html_url":"https://github.com/ubuntu-core/snappy/pull/778","diff_url":"https://github.com/ubuntu-core/snappy/pull/778.diff","patch_url":"https://github.com/ubuntu-core/snappy/pull/778.patch","issue_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/778","number":778,"state":"open","locked":false,"title":"overlord/snapstate: add SnapInfo()","user":{"login":"zyga","id":784262,"avatar_url":"https://avatars.githubusercontent.com/u/784262?v=3","gravatar_id":"","url":"https://api.github.com/users/zyga","html_url":"https://github.com/zyga","followers_url":"https://api.github.com/users/zyga/followers","following_url":"https://api.github.com/users/zyga/following{/other_user}","gists_url":"https://api.github.com/users/zyga/gists{/gist_id}","starred_url":"https://api.github.com/users/zyga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyga/subscriptions","organizations_url":"https://api.github.com/users/zyga/orgs","repos_url":"https://api.github.com/users/zyga/repos","events_url":"https://api.github.com/users/zyga/events{/privacy}","received_events_url":"https://api.github.com/users/zyga/received_events","type":"User","site_admin":false},"body":"This branch adds a way to load snap.Info through the overlord and state.State instance.\r\n\r\nI intend to use it in the interfaces manager whenever a snap.Info is requested. The function takes snap name and snap version (which can switch to snap revision) and always overwrites snap name and version in the loaded snap.yaml (since snap name and version=>revision is not a property of the yaml).\r\n","created_at":"2016-04-04T10:08:40Z","updated_at":"2016-04-04T10:40:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a88fad4fd46b0307565c579f6d86656e0a1e9593","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/778/commits","review_comments_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/778/comments","review_comment_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/778/comments","statuses_url":"https://api.github.com/repos/ubuntu-core/snappy/statuses/7f7838f34fcce9db87de203a9f5783e1ff1e712a","head":{"label":"zyga:overlord-security","ref":"overlord-security","sha":"7f7838f34fcce9db87de203a9f5783e1ff1e712a","user":{"login":"zyga","id":784262,"avatar_url":"https://avatars.githubusercontent.com/u/784262?v=3","gravatar_id":"","url":"https://api.github.com/users/zyga","html_url":"https://github.com/zyga","followers_url":"https://api.github.com/users/zyga/followers","following_url":"https://api.github.com/users/zyga/following{/other_user}","gists_url":"https://api.github.com/users/zyga/gists{/gist_id}","starred_url":"https://api.github.com/users/zyga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyga/subscriptions","organizations_url":"https://api.github.com/users/zyga/orgs","repos_url":"https://api.github.com/users/zyga/repos","events_url":"https://api.github.com/users/zyga/events{/privacy}","received_events_url":"https://api.github.com/users/zyga/received_events","type":"User","site_admin":false},"repo":{"id":45263078,"name":"snappy","full_name":"zyga/snappy","owner":{"login":"zyga","id":784262,"avatar_url":"https://avatars.githubusercontent.com/u/784262?v=3","gravatar_id":"","url":"https://api.github.com/users/zyga","html_url":"https://github.com/zyga","followers_url":"https://api.github.com/users/zyga/followers","following_url":"https://api.github.com/users/zyga/following{/other_user}","gists_url":"https://api.github.com/users/zyga/gists{/gist_id}","starred_url":"https://api.github.com/users/zyga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyga/subscriptions","organizations_url":"https://api.github.com/users/zyga/orgs","repos_url":"https://api.github.com/users/zyga/repos","events_url":"https://api.github.com/users/zyga/events{/privacy}","received_events_url":"https://api.github.com/users/zyga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zyga/snappy","description":"Snappy is the software at the heart of Ubuntu Core.","fork":true,"url":"https://api.github.com/repos/zyga/snappy","forks_url":"https://api.github.com/repos/zyga/snappy/forks","keys_url":"https://api.github.com/repos/zyga/snappy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zyga/snappy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zyga/snappy/teams","hooks_url":"https://api.github.com/repos/zyga/snappy/hooks","issue_events_url":"https://api.github.com/repos/zyga/snappy/issues/events{/number}","events_url":"https://api.github.com/repos/zyga/snappy/events","assignees_url":"https://api.github.com/repos/zyga/snappy/assignees{/user}","branches_url":"https://api.github.com/repos/zyga/snappy/branches{/branch}","tags_url":"https://api.github.com/repos/zyga/snappy/tags","blobs_url":"https://api.github.com/repos/zyga/snappy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zyga/snappy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zyga/snappy/git/refs{/sha}","trees_url":"https://api.github.com/repos/zyga/snappy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zyga/snappy/statuses/{sha}","languages_url":"https://api.github.com/repos/zyga/snappy/languages","stargazers_url":"https://api.github.com/repos/zyga/snappy/stargazers","contributors_url":"https://api.github.com/repos/zyga/snappy/contributors","subscribers_url":"https://api.github.com/repos/zyga/snappy/subscribers","subscription_url":"https://api.github.com/repos/zyga/snappy/subscription","commits_url":"https://api.github.com/repos/zyga/snappy/commits{/sha}","git_commits_url":"https://api.github.com/repos/zyga/snappy/git/commits{/sha}","comments_url":"https://api.github.com/repos/zyga/snappy/comments{/number}","issue_comment_url":"https://api.github.com/repos/zyga/snappy/issues/comments{/number}","contents_url":"https://api.github.com/repos/zyga/snappy/contents/{+path}","compare_url":"https://api.github.com/repos/zyga/snappy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zyga/snappy/merges","archive_url":"https://api.github.com/repos/zyga/snappy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zyga/snappy/downloads","issues_url":"https://api.github.com/repos/zyga/snappy/issues{/number}","pulls_url":"https://api.github.com/repos/zyga/snappy/pulls{/number}","milestones_url":"https://api.github.com/repos/zyga/snappy/milestones{/number}","notifications_url":"https://api.github.com/repos/zyga/snappy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zyga/snappy/labels{/name}","releases_url":"https://api.github.com/repos/zyga/snappy/releases{/id}","deployments_url":"https://api.github.com/repos/zyga/snappy/deployments","created_at":"2015-10-30T16:30:25Z","updated_at":"2016-03-09T07:58:32Z","pushed_at":"2016-04-04T10:38:29Z","git_url":"git://github.com/zyga/snappy.git","ssh_url":"git@github.com:zyga/snappy.git","clone_url":"https://github.com/zyga/snappy.git","svn_url":"https://github.com/zyga/snappy","homepage":null,"size":27074,"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":"ubuntu-core:master","ref":"master","sha":"591654d9cad263ab5cba3dfa020e9467bbf63e8d","user":{"login":"ubuntu-core","id":15022473,"avatar_url":"https://avatars.githubusercontent.com/u/15022473?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu-core","html_url":"https://github.com/ubuntu-core","followers_url":"https://api.github.com/users/ubuntu-core/followers","following_url":"https://api.github.com/users/ubuntu-core/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu-core/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu-core/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu-core/subscriptions","organizations_url":"https://api.github.com/users/ubuntu-core/orgs","repos_url":"https://api.github.com/users/ubuntu-core/repos","events_url":"https://api.github.com/users/ubuntu-core/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu-core/received_events","type":"Organization","site_admin":false},"repo":{"id":44672744,"name":"snappy","full_name":"ubuntu-core/snappy","owner":{"login":"ubuntu-core","id":15022473,"avatar_url":"https://avatars.githubusercontent.com/u/15022473?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu-core","html_url":"https://github.com/ubuntu-core","followers_url":"https://api.github.com/users/ubuntu-core/followers","following_url":"https://api.github.com/users/ubuntu-core/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu-core/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu-core/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu-core/subscriptions","organizations_url":"https://api.github.com/users/ubuntu-core/orgs","repos_url":"https://api.github.com/users/ubuntu-core/repos","events_url":"https://api.github.com/users/ubuntu-core/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu-core/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubuntu-core/snappy","description":"Snappy is the software at the heart of Ubuntu Core.","fork":false,"url":"https://api.github.com/repos/ubuntu-core/snappy","forks_url":"https://api.github.com/repos/ubuntu-core/snappy/forks","keys_url":"https://api.github.com/repos/ubuntu-core/snappy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubuntu-core/snappy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubuntu-core/snappy/teams","hooks_url":"https://api.github.com/repos/ubuntu-core/snappy/hooks","issue_events_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/events{/number}","events_url":"https://api.github.com/repos/ubuntu-core/snappy/events","assignees_url":"https://api.github.com/repos/ubuntu-core/snappy/assignees{/user}","branches_url":"https://api.github.com/repos/ubuntu-core/snappy/branches{/branch}","tags_url":"https://api.github.com/repos/ubuntu-core/snappy/tags","blobs_url":"https://api.github.com/repos/ubuntu-core/snappy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubuntu-core/snappy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubuntu-core/snappy/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubuntu-core/snappy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubuntu-core/snappy/statuses/{sha}","languages_url":"https://api.github.com/repos/ubuntu-core/snappy/languages","stargazers_url":"https://api.github.com/repos/ubuntu-core/snappy/stargazers","contributors_url":"https://api.github.com/repos/ubuntu-core/snappy/contributors","subscribers_url":"https://api.github.com/repos/ubuntu-core/snappy/subscribers","subscription_url":"https://api.github.com/repos/ubuntu-core/snappy/subscription","commits_url":"https://api.github.com/repos/ubuntu-core/snappy/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubuntu-core/snappy/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubuntu-core/snappy/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubuntu-core/snappy/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubuntu-core/snappy/contents/{+path}","compare_url":"https://api.github.com/repos/ubuntu-core/snappy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubuntu-core/snappy/merges","archive_url":"https://api.github.com/repos/ubuntu-core/snappy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubuntu-core/snappy/downloads","issues_url":"https://api.github.com/repos/ubuntu-core/snappy/issues{/number}","pulls_url":"https://api.github.com/repos/ubuntu-core/snappy/pulls{/number}","milestones_url":"https://api.github.com/repos/ubuntu-core/snappy/milestones{/number}","notifications_url":"https://api.github.com/repos/ubuntu-core/snappy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubuntu-core/snappy/labels{/name}","releases_url":"https://api.github.com/repos/ubuntu-core/snappy/releases{/id}","deployments_url":"https://api.github.com/repos/ubuntu-core/snappy/deployments","created_at":"2015-10-21T11:51:46Z","updated_at":"2016-04-01T15:13:08Z","pushed_at":"2016-04-04T10:38:29Z","git_url":"git://github.com/ubuntu-core/snappy.git","ssh_url":"git@github.com:ubuntu-core/snappy.git","clone_url":"https://github.com/ubuntu-core/snappy.git","svn_url":"https://github.com/ubuntu-core/snappy","homepage":null,"size":28020,"stargazers_count":61,"watchers_count":61,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":14,"forks":30,"open_issues":14,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/778"},"html":{"href":"https://github.com/ubuntu-core/snappy/pull/778"},"issue":{"href":"https://api.github.com/repos/ubuntu-core/snappy/issues/778"},"comments":{"href":"https://api.github.com/repos/ubuntu-core/snappy/issues/778/comments"},"review_comments":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/778/comments"},"review_comment":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ubuntu-core/snappy/pulls/778/commits"},"statuses":{"href":"https://api.github.com/repos/ubuntu-core/snappy/statuses/7f7838f34fcce9db87de203a9f5783e1ff1e712a"}}}}