{"action":"created","issue":{"url":"https://api.github.com/repos/LLNL/spack/issues/670","repository_url":"https://api.github.com/repos/LLNL/spack","labels_url":"https://api.github.com/repos/LLNL/spack/issues/670/labels{/name}","comments_url":"https://api.github.com/repos/LLNL/spack/issues/670/comments","events_url":"https://api.github.com/repos/LLNL/spack/issues/670/events","html_url":"https://github.com/LLNL/spack/pull/670","id":143854876,"number":670,"title":"enhancement : recursive uninstall","user":{"login":"alalazo","id":4199709,"avatar_url":"https://avatars.githubusercontent.com/u/4199709?v=3","gravatar_id":"","url":"https://api.github.com/users/alalazo","html_url":"https://github.com/alalazo","followers_url":"https://api.github.com/users/alalazo/followers","following_url":"https://api.github.com/users/alalazo/following{/other_user}","gists_url":"https://api.github.com/users/alalazo/gists{/gist_id}","starred_url":"https://api.github.com/users/alalazo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alalazo/subscriptions","organizations_url":"https://api.github.com/users/alalazo/orgs","repos_url":"https://api.github.com/users/alalazo/repos","events_url":"https://api.github.com/users/alalazo/events{/privacy}","received_events_url":"https://api.github.com/users/alalazo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-03-27T22:13:00Z","updated_at":"2016-04-01T17:30:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/LLNL/spack/pulls/670","html_url":"https://github.com/LLNL/spack/pull/670","diff_url":"https://github.com/LLNL/spack/pull/670.diff","patch_url":"https://github.com/LLNL/spack/pull/670.patch"},"body":"##### Modifications : \r\n- [x] added `--recursive` option to uninstall\r\n- [x] always prompt user for confirmation\r\n- [x] add tests for regression on the command\r\n\r\n##### Notes : \r\nI still need to check manually for regression on corner cases (like missing *.py package or similar). This is meant to address #651 . Any comment or bug report on the PR is welcome.\r\n\r\n##### Example : \r\n```\r\n$ spack find\r\n==> 8 installed packages.\r\n-- linux-x86_64 / gcc@4.8 ---------------------------------------\r\nbzip2@1.0.6  ncurses@6.0  openssl@1.0.2g  python@2.7.11  python@3.5.1  readline@6.3  sqlite@3.8.5  zlib@1.2.8\r\n\r\n$ spack uninstall python\r\n==> Error: python matches multiple packages:\r\n\r\n-- linux-x86_64 / gcc@4.8 ---------------------------------------\r\nnk2wnn4 python@2.7.11  7hxo5t5 python@3.5.1\r\n\r\n==> Error: You can either:\r\n    a) Use a more specific spec, or\r\n    b) use spack uninstall -a to uninstall ALL matching specs.\r\n\r\n$ spack uninstall -a python zlib\r\n==> Error: Will not uninstall zlib@1.2.8%gcc@4.8-pdtswcf\r\n\r\nThe following packages depend on it:\r\n-- linux-x86_64 / gcc@4.8 ---------------------------------------\r\n3trgywi openssl@1.0.2g\r\n\r\n==> Error: You can use spack uninstall -f to force this action\r\n\r\n$ spack uninstall -a -r python zlib\r\n==> The following packages will be uninstalled : \r\n\r\n-- linux-x86_64 / gcc@4.8 ---------------------------------------\r\n3trgywi openssl@1.0.2g  nk2wnn4 python@2.7.11  7hxo5t5 python@3.5.1  pdtswcf zlib@1.2.8\r\n\r\n==> Do you want to proceed ? [y/n]\r\ny\r\n==> Successfully uninstalled python@2.7.11%gcc@4.8=linux-x86_64-nk2wnn4\r\n==> Successfully uninstalled python@3.5.1%gcc@4.8=linux-x86_64-7hxo5t5\r\n==> Successfully uninstalled openssl@1.0.2g%gcc@4.8=linux-x86_64-3trgywi\r\n==> Successfully uninstalled zlib@1.2.8%gcc@4.8=linux-x86_64-pdtswcf\r\n```"},"comment":{"url":"https://api.github.com/repos/LLNL/spack/issues/comments/204480471","html_url":"https://github.com/LLNL/spack/pull/670#issuecomment-204480471","issue_url":"https://api.github.com/repos/LLNL/spack/issues/670","id":204480471,"user":{"login":"trws","id":660149,"avatar_url":"https://avatars.githubusercontent.com/u/660149?v=3","gravatar_id":"","url":"https://api.github.com/users/trws","html_url":"https://github.com/trws","followers_url":"https://api.github.com/users/trws/followers","following_url":"https://api.github.com/users/trws/following{/other_user}","gists_url":"https://api.github.com/users/trws/gists{/gist_id}","starred_url":"https://api.github.com/users/trws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trws/subscriptions","organizations_url":"https://api.github.com/users/trws/orgs","repos_url":"https://api.github.com/users/trws/repos","events_url":"https://api.github.com/users/trws/events{/privacy}","received_events_url":"https://api.github.com/users/trws/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T17:30:56Z","updated_at":"2016-04-01T17:30:56Z","body":"I'm perfectly good with that, it just struck me that the implementation was different than what I expected from the flag name.  It's no less useful for it, and it's definitely something I would use either way.\n\n\n________________________________\nFrom: Elizabeth Fischer\nSent: Friday, April 01, 2016 10:27:37 AM\nTo: LLNL/spack\nCc: Scogland, Thomas Richard William\nSubject: Re: [LLNL/spack] enhancement : recursive uninstall (#670)\n\nI thought about this too. Recursing in both directions is something\nsomeone might want. I think this PR should get merged; and then if someone\nwants the other kind of recursion, they can put it in later.\n\nThe only thing we MIGHT want to think about now is how the two kinds of\nrecursion should be named. Even so... if that results in a UI change, I\nthink we should merge this one now, and then change the UI in another PR.\n\nOn Fri, Apr 1, 2016 at 1:15 PM, Tom Scogland <notifications@github.com>\nwrote:\n\n> I like this concept, and I realize it's late to be nitpicking, but is this\n> what people will expect when they see \"recursive?\" This is uninstalling all\n> reverse dependencies on a given package. At least for me, I would kinda\n> expect recursive to be uninstalling a package and everything it caused to\n> be installed that is not otherwise required by an explicitly installed\n> package.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly or view it on GitHub\n> <https://github.com/LLNL/spack/pull/670#issuecomment-204475792>\n>\n\n—\nYou are receiving this because you commented.\nReply to this email directly or view it on GitHub<https://github.com/LLNL/spack/pull/670#issuecomment-204479257>\n"}}