{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/34574","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/34574/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/34574/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/34574/events","html_url":"https://github.com/ansible/ansible/pull/34574","id":286761074,"number":34574,"title":"pacman: recognize if a target package is provided by another package","user":{"login":"Boreeas","id":974869,"avatar_url":"https://avatars1.githubusercontent.com/u/974869?v=4","gravatar_id":"","url":"https://api.github.com/users/Boreeas","html_url":"https://github.com/Boreeas","followers_url":"https://api.github.com/users/Boreeas/followers","following_url":"https://api.github.com/users/Boreeas/following{/other_user}","gists_url":"https://api.github.com/users/Boreeas/gists{/gist_id}","starred_url":"https://api.github.com/users/Boreeas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Boreeas/subscriptions","organizations_url":"https://api.github.com/users/Boreeas/orgs","repos_url":"https://api.github.com/users/Boreeas/repos","events_url":"https://api.github.com/users/Boreeas/events{/privacy}","received_events_url":"https://api.github.com/users/Boreeas/received_events","type":"User","site_admin":false},"labels":[{"id":686214011,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.5","name":"affects_2.5","color":"ededed","default":false},{"id":48276098,"url":"https://api.github.com/repos/ansible/ansible/labels/bugfix_pull_request","name":"bugfix_pull_request","color":"ded270","default":false},{"id":501518759,"url":"https://api.github.com/repos/ansible/ansible/labels/community_review","name":"community_review","color":"f9d0c4","default":false},{"id":496359346,"url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":723150340,"url":"https://api.github.com/repos/ansible/ansible/labels/new_contributor","name":"new_contributor","color":"ededed","default":false},{"id":636327968,"url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-01-08T14:26:33Z","updated_at":"2018-02-10T11:43:21Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/34574","html_url":"https://github.com/ansible/ansible/pull/34574","diff_url":"https://github.com/ansible/ansible/pull/34574.diff","patch_url":"https://github.com/ansible/ansible/pull/34574.patch"},"body":"##### SUMMARY\r\nPackages that are provided by a different package (example: 'cron' is provided by 'cronie') are not recognized by the pacman module and always assumed uninstalled. In particular, this leads to crashes when trying to install the package because pacman output is not in the expected format.\r\n\r\nIf querying package information for the target package fails, we look through all installed packages and try to find one that provides the target instead, then proceed with this package's name and version.\r\n\r\nFixes #24110\r\n\r\n##### ISSUE TYPE\r\n - Bugfix Pull Request\r\n\r\n##### COMPONENT NAME\r\npacman\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.5.0 (devel 29b781f46e) last updated 2018/01/08 15:20:39 (GMT +200)\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = [u'/home/boreeas/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /home/boreeas/Projects/Python/ansible/lib/ansible\r\n  executable location = ../Python/ansible/bin/ansible\r\n  python version = 2.7.14 (default, Sep 20 2017, 01:25:59) [GCC 7.2.0]\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/364645879","html_url":"https://github.com/ansible/ansible/pull/34574#issuecomment-364645879","issue_url":"https://api.github.com/repos/ansible/ansible/issues/34574","id":364645879,"user":{"login":"thomwiggers","id":974662,"avatar_url":"https://avatars1.githubusercontent.com/u/974662?v=4","gravatar_id":"","url":"https://api.github.com/users/thomwiggers","html_url":"https://github.com/thomwiggers","followers_url":"https://api.github.com/users/thomwiggers/followers","following_url":"https://api.github.com/users/thomwiggers/following{/other_user}","gists_url":"https://api.github.com/users/thomwiggers/gists{/gist_id}","starred_url":"https://api.github.com/users/thomwiggers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomwiggers/subscriptions","organizations_url":"https://api.github.com/users/thomwiggers/orgs","repos_url":"https://api.github.com/users/thomwiggers/repos","events_url":"https://api.github.com/users/thomwiggers/events{/privacy}","received_events_url":"https://api.github.com/users/thomwiggers/received_events","type":"User","site_admin":false},"created_at":"2018-02-10T11:43:21Z","updated_at":"2018-02-10T11:43:21Z","author_association":"CONTRIBUTOR","body":"Removing the package doesn't work yet:\r\n\r\n```\r\nTASK [Test] *********************************************************************************************************\r\ntask path: /home/thom/git/ansible/test.yml:5\r\nUsing module file /home/thom/git/ansible/lib/ansible/modules/packaging/os/pacman.py\r\n<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: thom\r\n<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1518262965.6788666-203920860699125 `\" && echo ansible-tmp-1518262965.6788666-203920860699125=\"` echo $HOME/.ansible/tmp/ansible-tmp-1518262965.6788666-203920860699125 `\" ) && sleep 0'\r\n<127.0.0.1> PUT /tmp/tmpv6a1jhmn TO /home/thom/.ansible/tmp/ansible-tmp-1518262965.6788666-203920860699125/pacman.py\r\n<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/thom/.ansible/tmp/ansible-tmp-1518262965.6788666-203920860699125/ /home/thom/.ansible/tmp/ansible-tmp-1518262965.6788666-203920860699125/pacman.py && sleep 0'\r\n<127.0.0.1> EXEC /bin/sh -c 'sudo -H -S  -p \"[sudo via ansible, key=mrynkuyoccyyxwhimcyxmrxlaotcaozo] password: \" -u root /bin/sh -c '\"'\"'echo BECOME-SUCCESS-mrynkuyoccyyxwhimcyxmrxlaotcaozo; /home/thom/.pythonenvs/ansible/bin/python /home/thom/.ansible/tmp/ansible-tmp-1518262965.6788666-203920860699125/pacman.py; rm -rf \"/home/thom/.ansible/tmp/ansible-tmp-1518262965.6788666-203920860699125/\" > /dev/null 2>&1'\"'\"' && sleep 0'\r\nfatal: [localhost]: FAILED! => {\r\n    \"attempts\": 1,\r\n    \"changed\": false,\r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"force\": false,\r\n            \"name\": [\r\n                \"svn\"\r\n            ],\r\n            \"recurse\": false,\r\n            \"state\": \"absent\",\r\n            \"update_cache\": false,\r\n            \"upgrade\": false\r\n        }\r\n    },\r\n    \"msg\": \"failed to remove svn\"\r\n}\r\n\t\r\n```"}}
{"actor":{"display_login":"thomwiggers"}}