{"action":"created","comment":{"url":"https://api.github.com/repos/rpm-software-management/dnf/pulls/comments/218426364","pull_request_review_id":156359677,"id":218426364,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODQyNjM2NA==","diff_hunk":"@@ -155,6 +156,14 @@ def _install_groups(self, grp_specs):\n             if self.base.conf.strict:\n                 raise\n \n+    def _report_alternatives(self, pkg_spec):\n+        subj = dnf.subject.Subject(self.alternatives_provide.format(pkg_spec))\n+        query = subj.get_best_query(self.base.sack, with_nevra=False,\n+                                    with_provides=True, with_filenames=False)\n+        if query:\n+            msg = _('There are following alternatives for this package: {}')\n+            logger.info(msg.format(', '.join([alt.name for alt in query])))","path":"dnf/cli/commands/install.py","position":18,"original_position":18,"commit_id":"0f71cccdcbe49b8563281b341956060c1ceb62e9","original_commit_id":"0f71cccdcbe49b8563281b341956060c1ceb62e9","user":{"login":"j-mracek","id":12737303,"node_id":"MDQ6VXNlcjEyNzM3MzAz","avatar_url":"https://avatars2.githubusercontent.com/u/12737303?v=4","gravatar_id":"","url":"https://api.github.com/users/j-mracek","html_url":"https://github.com/j-mracek","followers_url":"https://api.github.com/users/j-mracek/followers","following_url":"https://api.github.com/users/j-mracek/following{/other_user}","gists_url":"https://api.github.com/users/j-mracek/gists{/gist_id}","starred_url":"https://api.github.com/users/j-mracek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-mracek/subscriptions","organizations_url":"https://api.github.com/users/j-mracek/orgs","repos_url":"https://api.github.com/users/j-mracek/repos","events_url":"https://api.github.com/users/j-mracek/events{/privacy}","received_events_url":"https://api.github.com/users/j-mracek/received_events","type":"User","site_admin":false},"body":"what about ```sorted(set([alt.name for alt in query]))```","created_at":"2018-09-18T13:16:25Z","updated_at":"2018-09-18T13:19:48Z","html_url":"https://github.com/rpm-software-management/dnf/pull/1210#discussion_r218426364","pull_request_url":"https://api.github.com/repos/rpm-software-management/dnf/pulls/1210","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/rpm-software-management/dnf/pulls/comments/218426364"},"html":{"href":"https://github.com/rpm-software-management/dnf/pull/1210#discussion_r218426364"},"pull_request":{"href":"https://api.github.com/repos/rpm-software-management/dnf/pulls/1210"}}},"pull_request":{"url":"https://api.github.com/repos/rpm-software-management/dnf/pulls/1210","id":216044762,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2MDQ0NzYy","html_url":"https://github.com/rpm-software-management/dnf/pull/1210","diff_url":"https://github.com/rpm-software-management/dnf/pull/1210.diff","patch_url":"https://github.com/rpm-software-management/dnf/pull/1210.patch","issue_url":"https://api.github.com/repos/rpm-software-management/dnf/issues/1210","number":1210,"state":"open","locked":false,"title":"[cli] Install command recommends alternative packages (RhBug:1625586)","user":{"login":"m-blaha","id":335612,"node_id":"MDQ6VXNlcjMzNTYxMg==","avatar_url":"https://avatars2.githubusercontent.com/u/335612?v=4","gravatar_id":"","url":"https://api.github.com/users/m-blaha","html_url":"https://github.com/m-blaha","followers_url":"https://api.github.com/users/m-blaha/followers","following_url":"https://api.github.com/users/m-blaha/following{/other_user}","gists_url":"https://api.github.com/users/m-blaha/gists{/gist_id}","starred_url":"https://api.github.com/users/m-blaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-blaha/subscriptions","organizations_url":"https://api.github.com/users/m-blaha/orgs","repos_url":"https://api.github.com/users/m-blaha/repos","events_url":"https://api.github.com/users/m-blaha/events{/privacy}","received_events_url":"https://api.github.com/users/m-blaha/received_events","type":"User","site_admin":false},"body":"https://bugzilla.redhat.com/show_bug.cgi?id=1625586","created_at":"2018-09-17T16:40:33Z","updated_at":"2018-09-18T13:19:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e39e585871175f26f7685302b4c8b2f5ed661c72","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rpm-software-management/dnf/pulls/1210/commits","review_comments_url":"https://api.github.com/repos/rpm-software-management/dnf/pulls/1210/comments","review_comment_url":"https://api.github.com/repos/rpm-software-management/dnf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rpm-software-management/dnf/issues/1210/comments","statuses_url":"https://api.github.com/repos/rpm-software-management/dnf/statuses/0f71cccdcbe49b8563281b341956060c1ceb62e9","head":{"label":"m-blaha:alternatives","ref":"alternatives","sha":"0f71cccdcbe49b8563281b341956060c1ceb62e9","user":{"login":"m-blaha","id":335612,"node_id":"MDQ6VXNlcjMzNTYxMg==","avatar_url":"https://avatars2.githubusercontent.com/u/335612?v=4","gravatar_id":"","url":"https://api.github.com/users/m-blaha","html_url":"https://github.com/m-blaha","followers_url":"https://api.github.com/users/m-blaha/followers","following_url":"https://api.github.com/users/m-blaha/following{/other_user}","gists_url":"https://api.github.com/users/m-blaha/gists{/gist_id}","starred_url":"https://api.github.com/users/m-blaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-blaha/subscriptions","organizations_url":"https://api.github.com/users/m-blaha/orgs","repos_url":"https://api.github.com/users/m-blaha/repos","events_url":"https://api.github.com/users/m-blaha/events{/privacy}","received_events_url":"https://api.github.com/users/m-blaha/received_events","type":"User","site_admin":false},"repo":{"id":94745047,"node_id":"MDEwOlJlcG9zaXRvcnk5NDc0NTA0Nw==","name":"dnf","full_name":"m-blaha/dnf","private":false,"owner":{"login":"m-blaha","id":335612,"node_id":"MDQ6VXNlcjMzNTYxMg==","avatar_url":"https://avatars2.githubusercontent.com/u/335612?v=4","gravatar_id":"","url":"https://api.github.com/users/m-blaha","html_url":"https://github.com/m-blaha","followers_url":"https://api.github.com/users/m-blaha/followers","following_url":"https://api.github.com/users/m-blaha/following{/other_user}","gists_url":"https://api.github.com/users/m-blaha/gists{/gist_id}","starred_url":"https://api.github.com/users/m-blaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-blaha/subscriptions","organizations_url":"https://api.github.com/users/m-blaha/orgs","repos_url":"https://api.github.com/users/m-blaha/repos","events_url":"https://api.github.com/users/m-blaha/events{/privacy}","received_events_url":"https://api.github.com/users/m-blaha/received_events","type":"User","site_admin":false},"html_url":"https://github.com/m-blaha/dnf","description":"dnf is a package manager based on yum and libsolv","fork":true,"url":"https://api.github.com/repos/m-blaha/dnf","forks_url":"https://api.github.com/repos/m-blaha/dnf/forks","keys_url":"https://api.github.com/repos/m-blaha/dnf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m-blaha/dnf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m-blaha/dnf/teams","hooks_url":"https://api.github.com/repos/m-blaha/dnf/hooks","issue_events_url":"https://api.github.com/repos/m-blaha/dnf/issues/events{/number}","events_url":"https://api.github.com/repos/m-blaha/dnf/events","assignees_url":"https://api.github.com/repos/m-blaha/dnf/assignees{/user}","branches_url":"https://api.github.com/repos/m-blaha/dnf/branches{/branch}","tags_url":"https://api.github.com/repos/m-blaha/dnf/tags","blobs_url":"https://api.github.com/repos/m-blaha/dnf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m-blaha/dnf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m-blaha/dnf/git/refs{/sha}","trees_url":"https://api.github.com/repos/m-blaha/dnf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m-blaha/dnf/statuses/{sha}","languages_url":"https://api.github.com/repos/m-blaha/dnf/languages","stargazers_url":"https://api.github.com/repos/m-blaha/dnf/stargazers","contributors_url":"https://api.github.com/repos/m-blaha/dnf/contributors","subscribers_url":"https://api.github.com/repos/m-blaha/dnf/subscribers","subscription_url":"https://api.github.com/repos/m-blaha/dnf/subscription","commits_url":"https://api.github.com/repos/m-blaha/dnf/commits{/sha}","git_commits_url":"https://api.github.com/repos/m-blaha/dnf/git/commits{/sha}","comments_url":"https://api.github.com/repos/m-blaha/dnf/comments{/number}","issue_comment_url":"https://api.github.com/repos/m-blaha/dnf/issues/comments{/number}","contents_url":"https://api.github.com/repos/m-blaha/dnf/contents/{+path}","compare_url":"https://api.github.com/repos/m-blaha/dnf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m-blaha/dnf/merges","archive_url":"https://api.github.com/repos/m-blaha/dnf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m-blaha/dnf/downloads","issues_url":"https://api.github.com/repos/m-blaha/dnf/issues{/number}","pulls_url":"https://api.github.com/repos/m-blaha/dnf/pulls{/number}","milestones_url":"https://api.github.com/repos/m-blaha/dnf/milestones{/number}","notifications_url":"https://api.github.com/repos/m-blaha/dnf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m-blaha/dnf/labels{/name}","releases_url":"https://api.github.com/repos/m-blaha/dnf/releases{/id}","deployments_url":"https://api.github.com/repos/m-blaha/dnf/deployments","created_at":"2017-06-19T06:45:50Z","updated_at":"2018-03-19T15:23:01Z","pushed_at":"2018-09-18T07:53:36Z","git_url":"git://github.com/m-blaha/dnf.git","ssh_url":"git@github.com:m-blaha/dnf.git","clone_url":"https://github.com/m-blaha/dnf.git","svn_url":"https://github.com/m-blaha/dnf","homepage":"","size":47723,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rpm-software-management:master","ref":"master","sha":"d4e0e44e8e910df7f646dfeb93ea44b521d236c2","user":{"login":"rpm-software-management","id":8504469,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MDQ0Njk=","avatar_url":"https://avatars3.githubusercontent.com/u/8504469?v=4","gravatar_id":"","url":"https://api.github.com/users/rpm-software-management","html_url":"https://github.com/rpm-software-management","followers_url":"https://api.github.com/users/rpm-software-management/followers","following_url":"https://api.github.com/users/rpm-software-management/following{/other_user}","gists_url":"https://api.github.com/users/rpm-software-management/gists{/gist_id}","starred_url":"https://api.github.com/users/rpm-software-management/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpm-software-management/subscriptions","organizations_url":"https://api.github.com/users/rpm-software-management/orgs","repos_url":"https://api.github.com/users/rpm-software-management/repos","events_url":"https://api.github.com/users/rpm-software-management/events{/privacy}","received_events_url":"https://api.github.com/users/rpm-software-management/received_events","type":"Organization","site_admin":false},"repo":{"id":3671909,"node_id":"MDEwOlJlcG9zaXRvcnkzNjcxOTA5","name":"dnf","full_name":"rpm-software-management/dnf","private":false,"owner":{"login":"rpm-software-management","id":8504469,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MDQ0Njk=","avatar_url":"https://avatars3.githubusercontent.com/u/8504469?v=4","gravatar_id":"","url":"https://api.github.com/users/rpm-software-management","html_url":"https://github.com/rpm-software-management","followers_url":"https://api.github.com/users/rpm-software-management/followers","following_url":"https://api.github.com/users/rpm-software-management/following{/other_user}","gists_url":"https://api.github.com/users/rpm-software-management/gists{/gist_id}","starred_url":"https://api.github.com/users/rpm-software-management/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpm-software-management/subscriptions","organizations_url":"https://api.github.com/users/rpm-software-management/orgs","repos_url":"https://api.github.com/users/rpm-software-management/repos","events_url":"https://api.github.com/users/rpm-software-management/events{/privacy}","received_events_url":"https://api.github.com/users/rpm-software-management/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/rpm-software-management/dnf","description":"Package manager based on libdnf and libsolv. Replaces YUM.","fork":false,"url":"https://api.github.com/repos/rpm-software-management/dnf","forks_url":"https://api.github.com/repos/rpm-software-management/dnf/forks","keys_url":"https://api.github.com/repos/rpm-software-management/dnf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rpm-software-management/dnf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rpm-software-management/dnf/teams","hooks_url":"https://api.github.com/repos/rpm-software-management/dnf/hooks","issue_events_url":"https://api.github.com/repos/rpm-software-management/dnf/issues/events{/number}","events_url":"https://api.github.com/repos/rpm-software-management/dnf/events","assignees_url":"https://api.github.com/repos/rpm-software-management/dnf/assignees{/user}","branches_url":"https://api.github.com/repos/rpm-software-management/dnf/branches{/branch}","tags_url":"https://api.github.com/repos/rpm-software-management/dnf/tags","blobs_url":"https://api.github.com/repos/rpm-software-management/dnf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rpm-software-management/dnf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rpm-software-management/dnf/git/refs{/sha}","trees_url":"https://api.github.com/repos/rpm-software-management/dnf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rpm-software-management/dnf/statuses/{sha}","languages_url":"https://api.github.com/repos/rpm-software-management/dnf/languages","stargazers_url":"https://api.github.com/repos/rpm-software-management/dnf/stargazers","contributors_url":"https://api.github.com/repos/rpm-software-management/dnf/contributors","subscribers_url":"https://api.github.com/repos/rpm-software-management/dnf/subscribers","subscription_url":"https://api.github.com/repos/rpm-software-management/dnf/subscription","commits_url":"https://api.github.com/repos/rpm-software-management/dnf/commits{/sha}","git_commits_url":"https://api.github.com/repos/rpm-software-management/dnf/git/commits{/sha}","comments_url":"https://api.github.com/repos/rpm-software-management/dnf/comments{/number}","issue_comment_url":"https://api.github.com/repos/rpm-software-management/dnf/issues/comments{/number}","contents_url":"https://api.github.com/repos/rpm-software-management/dnf/contents/{+path}","compare_url":"https://api.github.com/repos/rpm-software-management/dnf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rpm-software-management/dnf/merges","archive_url":"https://api.github.com/repos/rpm-software-management/dnf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rpm-software-management/dnf/downloads","issues_url":"https://api.github.com/repos/rpm-software-management/dnf/issues{/number}","pulls_url":"https://api.github.com/repos/rpm-software-management/dnf/pulls{/number}","milestones_url":"https://api.github.com/repos/rpm-software-management/dnf/milestones{/number}","notifications_url":"https://api.github.com/repos/rpm-software-management/dnf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rpm-software-management/dnf/labels{/name}","releases_url":"https://api.github.com/repos/rpm-software-management/dnf/releases{/id}","deployments_url":"https://api.github.com/repos/rpm-software-management/dnf/deployments","created_at":"2012-03-09T15:31:09Z","updated_at":"2018-09-18T12:49:04Z","pushed_at":"2018-09-18T12:48:59Z","git_url":"git://github.com/rpm-software-management/dnf.git","ssh_url":"git@github.com:rpm-software-management/dnf.git","clone_url":"https://github.com/rpm-software-management/dnf.git","svn_url":"https://github.com/rpm-software-management/dnf","homepage":"","size":47968,"stargazers_count":552,"watchers_count":552,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":215,"mirror_url":null,"archived":false,"open_issues_count":30,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":215,"open_issues":30,"watchers":552,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rpm-software-management/dnf/pulls/1210"},"html":{"href":"https://github.com/rpm-software-management/dnf/pull/1210"},"issue":{"href":"https://api.github.com/repos/rpm-software-management/dnf/issues/1210"},"comments":{"href":"https://api.github.com/repos/rpm-software-management/dnf/issues/1210/comments"},"review_comments":{"href":"https://api.github.com/repos/rpm-software-management/dnf/pulls/1210/comments"},"review_comment":{"href":"https://api.github.com/repos/rpm-software-management/dnf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rpm-software-management/dnf/pulls/1210/commits"},"statuses":{"href":"https://api.github.com/repos/rpm-software-management/dnf/statuses/0f71cccdcbe49b8563281b341956060c1ceb62e9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"j-mracek"}}