Brew: Report more detail on why a formula is disabled.

Created on 26 Aug 2020  路  4Comments  路  Source: Homebrew/brew

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

Add ability for "disabled" formula to include a reason and or link to why the formula is disabled. See osquery https://github.com/Homebrew/homebrew-core/pull/54905 where the version in the repo contains security vulnerabilities, is out of date, and no plans to update in place.

The motivation for the feature

Unnecessary investigation for users to understand why a formula is disabled. It might make more sense to remove formulas if there is no intention to provide users with direct information beyond:

brew install osquery
Error: osquery has been disabled!

Which resulted in my opening an inquiry to IT, who confirmed they did not disable it. Followed by tracing down the related commit (which wasn't even the last commit to this formula).

commit d00c56283ab915727e9dd70b20031ef7f361dcfe
Author: Sean Molenaar smillerdev@me.com
Date: Mon May 18 17:30:45 2020 +0200
osquery: disable

Which again failed to explain why it was disabled, which I then had to search the issues, of which there are no open issues indicated why it was disabled. So I then searched types for osquery which found this pull request.

https://github.com/Homebrew/homebrew-core/pull/54905

How the feature would be relevant to at least 90% of Homebrew users

They would know why they should not attempt to install this formula or inquiry within their own org to identify why it isn't working. And prevent them from modifying the formula to install it (removing the disabled flag locally) and potentially installing dangerous software.

What alternatives to the feature have been considered

Remove any formula which would otherwise be disabled, this avoids all the unnecessary issues with trying to understand why it's disabled to begin with. And prevents anyone from simply editing the local brew formula and forcing an install for most people.

Most helpful comment

Thanks for bringing this up! I think you're right. It's jarring for users to suddenly have a formula be marked as disabled and it's not immediately clear where to find more information.

Currently, conflicts_with takes a because argument with an explanation for the conflict_with call (see vim for an example). I'd suggest implementing that kind of thing for disable! (maybe deprecate!) as well.

This would mean that the line in osquery would be something like:

disable! because: "it has rendered dependencies that duplicate Homebrew libraries"

And could show an error message like:

$ brew install osquery
Error: osquery has been disabled because it has rendered dependencies that duplicate Homebrew libraries.

I also wouldn't be opposed to linking the PR that disables the formula to give more context if needed.

All 4 comments

Thanks for bringing this up! I think you're right. It's jarring for users to suddenly have a formula be marked as disabled and it's not immediately clear where to find more information.

Currently, conflicts_with takes a because argument with an explanation for the conflict_with call (see vim for an example). I'd suggest implementing that kind of thing for disable! (maybe deprecate!) as well.

This would mean that the line in osquery would be something like:

disable! because: "it has rendered dependencies that duplicate Homebrew libraries"

And could show an error message like:

$ brew install osquery
Error: osquery has been disabled because it has rendered dependencies that duplicate Homebrew libraries.

I also wouldn't be opposed to linking the PR that disables the formula to give more context if needed.

Currently, conflicts_with takes a because argument with an explanation for the conflict_with call (see vim for an example). I'd suggest implementing that kind of thing for disable! (maybe deprecate!) as well.

I also wouldn't be opposed to linking the PR that disables the formula to give more context if needed.

These both make sense to me. @Rylan12 would you be able to start a PR for this? Thanks!

These both make sense to me. @Rylan12 would you be able to start a PR for this? Thanks!

Yep! Got a busy morning so I'll start it later today.

Thank you very much! Myself and many other are going to really appreciate this! :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

paanvaannd picture paanvaannd  路  4Comments

JustinTArthur picture JustinTArthur  路  3Comments

mislav picture mislav  路  3Comments

vitahlin picture vitahlin  路  4Comments

kirk86 picture kirk86  路  3Comments