How to avoid formula dependencies being added to $PATH? #5854
Unanswered
mfschumann
asked this question in
Linux
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Additional Info
Output of
brew config
Output of
brew doctor
Description of issue
Hi,
I am currently investigating homebrew on Fedora Silverblue as an alternative to package layering. Mostly homebrew works ok for my use case, but one thing regarding installation of dependencies boggles me. I'll give you an example: I want to install
btrbk
, a perl script with a handful of dependencies. One of the dependencies (btrfs-progs
) pulls in a huge tree of its own dependencies, includingsystemd
and many more other basic tools most of which I already have installed on my system (not via homebrew though).brew install btrbk
now installs all of the recursive dependencies and makes the included binaries available in/home/linuxbrew/.linuxbrew/bin
, shadowing the system-installed version ofsystemctl
etc. (because homebrew prepends/home/linuxbrew/.linuxbrew/bin
to$PATH
).Is it possible with homebrew to only make the formulae that were explicitely installed by the user, but not their dependencies, available in the
$PATH
? Nix seems to do that by replacing the binaries by wrapper scripts that dynamically add the dependencies' binaries to$PATH
. A simpler solution to avoid shadowing may be to only link explicitely installed binaries into/home/linuxbrew/.linuxbrew/bin
, and all dependencies in a different directory that is appended to the$PATH
.Dependency tree for
btrbk
:Beta Was this translation helpful? Give feedback.
All reactions