-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transitive dependencies not uninstalled in correct order #14
Comments
Unfortunately this repo seems to be dead/inactive. I guess it's best to settle for one of the forks to continue, e.g. https://github.com/jsfaint/homebrew-rmtree as it solves the (as of now probably most important) problem explained in #11 |
This issue is also a problem in the linked repo. I'd create an issue there as well, if the repo allowed the creation of issues |
If you |
Thanks for reporting this, and thanks for the detailed example. I'll look into this |
Hi @Argon- My PR was already merged by @beeftornado |
I got around this by adding the |
@metakirby5 Doesn't this mean that the dependencies aren't removed? |
No. If HOMEBREW_DEVELOPER is not set, and there are reverse dependencies using a formula, brew will error out if you try to remove that formula. If HOMEBREW_DEVELOPER is set, and there are reverse dependencies using a formula, brew will issue a warning if you try to remove that formula. The fact that rmtree needs to use |
I'm not sure if this will be the behaviour I'm looking for though, as this might uninstall packages that might be needed for other packages. |
@irundaia theoretically it should be fine because the cause is that the packages are being removed in the "wrong" order instead of all at once or in the "right" order. The "correct" fix here is to remove them in a single call to brew uninstall, "brew uninstall A B C D" or to do the uninstalls in an order that always removes a reverse dependency before its dependencies. |
In the meantime I put together a quick hack to recursively remove dependencies. Check it out: https://github.com/ggPeti/homebrew-rmrec |
@ggPeti, I've tested your work, it seems to work fine :) It does seem to be a tad slow tbh. But I can deal with that. :) |
I've had gnupg2 installed for quite some time and I wanted to remove it. So I called
brew rmtree gnupg2
.This listed the following dependencies:
After accepting the uninstallation of all these packages, brew failed to uninstall several dependencies because they were needed for some dependencies in this list. For instance, it started with uninstalling
libgpg-error
, which was still required for dirmngr. Below I've attached the log of the first run ofbrew rmtree
(I've used it to also uninstall the refused formulae after the first run).The text was updated successfully, but these errors were encountered: