{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/21845","labels_url":"https://api.github.com/repos/saltstack/salt/issues/21845/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/21845/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/21845/events","html_url":"https://github.com/saltstack/salt/issues/21845","id":63253921,"number":21845,"title":"pip.install: fails in v2015.2.0rc1 when the package is already installed (pip v1.0)","user":{"login":"kitsemets","id":2895984,"avatar_url":"https://avatars.githubusercontent.com/u/2895984?v=3","gravatar_id":"","url":"https://api.github.com/users/kitsemets","html_url":"https://github.com/kitsemets","followers_url":"https://api.github.com/users/kitsemets/followers","following_url":"https://api.github.com/users/kitsemets/following{/other_user}","gists_url":"https://api.github.com/users/kitsemets/gists{/gist_id}","starred_url":"https://api.github.com/users/kitsemets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitsemets/subscriptions","organizations_url":"https://api.github.com/users/kitsemets/orgs","repos_url":"https://api.github.com/users/kitsemets/repos","events_url":"https://api.github.com/users/kitsemets/events{/privacy}","received_events_url":"https://api.github.com/users/kitsemets/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Boron","name":"Boron","color":"fbca04"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P1","name":"P1","color":"2181ee"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Platform","name":"Platform","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Release%20Notes","name":"Release Notes","color":"bfdadc"},{"url":"https://api.github.com/repos/saltstack/salt/labels/State%20Module","name":"State Module","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":2502,"closed_issues":2537,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-09-01T17:53:25Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2015-03-20T15:57:18Z","updated_at":"2015-09-01T17:57:15Z","closed_at":null,"body":"In #19001 `salt/states/pip_state.py` code was changed so that `pip install` would be run even if there is nothing to install.\r\nWith pip v1.0 `pip install` returns 1 when run without any arguments:\r\n```\r\n$ pip install\r\nYou must give at least one requirement to install (see \"pip help install\")\r\nStoring complete log in /home/vagrant/.pip/pip.log\r\n$ echo $?\r\n1\r\n```\r\nWith pip2 the message is the same but it returns 0:\r\n```\r\n$ pip install\r\nYou must give at least one requirement to install (see \"pip help install\")\r\n$ echo $?\r\n0\r\n```\r\n\r\nstate.sls:\r\n```\r\npython-gnupg:\r\n  pip.installed:\r\n    - require:\r\n      - pkg: python-pip\r\n\r\npython-pip:\r\n  pkg.installed\r\n```\r\nResult:\r\n```\r\n----------\r\n          ID: python-pip\r\n    Function: pkg.installed\r\n        Name: python-pip \r\n      Result: True     \r\n     Comment: The following packages were installed/updated: python-pip.\r\n     Started: 14:52:19.481977\r\n    Duration: 7788.201 ms\r\n     Changes:         \r\n              ----------       \r\n              python-distribute:\r\n                  ----------       \r\n                  new:             \r\n                      1                \r\n                  old:             \r\n                                       \r\n              python-pip:      \r\n                  ----------       \r\n                  new:             \r\n                      1.0-1build1      \r\n                  old:             \r\n                                       \r\n              python-setuptools:\r\n                  ----------       \r\n                  new:             \r\n                      0.6.24-1ubuntu1  \r\n                  old:             \r\n----------\r\n          ID: python-gnupg\r\n    Function: pip.installed\r\n        Name: python-gnupg\r\n      Result: False\r\n     Comment: Python package python-gnupg was already installed\r\n              Failed to install packages: . Error: You must give at least one requirement to install (see \"pip help install\")\r\n              Storing complete log in /home/vagrant/.pip/pip.log\r\n     Started: 14:52:27.273236\r\n    Duration: 220.27 ms\r\n     Changes:   \r\n----------\r\n```\r\nAdding `- ignore_installed: True` to the pip state will make the package install, but then it is installed during every highstate call."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/136812294","html_url":"https://github.com/saltstack/salt/issues/21845#issuecomment-136812294","issue_url":"https://api.github.com/repos/saltstack/salt/issues/21845","id":136812294,"user":{"login":"akoumjian","id":733988,"avatar_url":"https://avatars.githubusercontent.com/u/733988?v=3","gravatar_id":"","url":"https://api.github.com/users/akoumjian","html_url":"https://github.com/akoumjian","followers_url":"https://api.github.com/users/akoumjian/followers","following_url":"https://api.github.com/users/akoumjian/following{/other_user}","gists_url":"https://api.github.com/users/akoumjian/gists{/gist_id}","starred_url":"https://api.github.com/users/akoumjian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akoumjian/subscriptions","organizations_url":"https://api.github.com/users/akoumjian/orgs","repos_url":"https://api.github.com/users/akoumjian/repos","events_url":"https://api.github.com/users/akoumjian/events{/privacy}","received_events_url":"https://api.github.com/users/akoumjian/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T17:57:15Z","updated_at":"2015-09-01T17:57:15Z","body":"+1"}}