Skip to content

Allows for choosing between multiple options for a dependency and use the installed option when available #20147

Closed as not planned
@marco-brandizi

Description

@marco-brandizi

Verification

Provide a detailed description of the proposed feature

Many Homebrew packages (eg, Maven) that depend on Java have a hardwired dependency on the Brew OpenJDK. Usually, I prefer Temurin, and more flavours of JDKs are available from Brew that could run the packages at issue without problems.

As in other package managers (eg, apt), I'd like to have an option to tell which JDK I want in those cases. I already use --ignore-dependencies, but that's not the same thing, since the unwanted OpenJDK is installed as soon as I forget to use that flag.

Obviously, this applies to similar situations where a package depends on some general framework/server/etc (eg, many web applications that force Apache, when I actually use NGINX, or if you like, vice versa).

What is the motivation for the feature?

More flexibility with managing dependencies that can be fulfilled by multiple alternative packages.

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

More than 90% of users have their preferences, and one-fit-all solutions are very rare.

What alternatives to the feature have been considered?

--ignore-dependencies, but it's not as good as what I'm proposing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions