diff options
| author | Jack Nagel | 2013-11-13 10:38:14 -0600 | 
|---|---|---|
| committer | Jack Nagel | 2013-11-13 10:38:14 -0600 | 
| commit | fdfc54961eb497b6dd854852dc604cb50c994fda (patch) | |
| tree | 57dea1135fc65eab085cbf77e80a7f4cb9915eb7 /Library/Homebrew/dependency.rb | |
| parent | 4715b3c93616395bdca30c6ed8fc65b5525c3941 (diff) | |
| download | homebrew-fdfc54961eb497b6dd854852dc604cb50c994fda.tar.bz2 | |
Prevent deps of build-time deps from leaking into the build environment
When decided what dependencies should be part of the build environment
(and have appropriate entries added to variables like PKG_CONFIG_PATH),
we select the entire dependency tree except for
 (1) inactive optional and recommended deps (2) indirect build-time deps
 (i.e., build-time deps of other deps)
There is a third category that sould be excluded: dependencies of direct
build-time deps. These are irrelevant to the build, and including them
can cause unexpected linkages.
Diffstat (limited to 'Library/Homebrew/dependency.rb')
| -rw-r--r-- | Library/Homebrew/dependency.rb | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/dependency.rb b/Library/Homebrew/dependency.rb index df22eed90..fda491b99 100644 --- a/Library/Homebrew/dependency.rb +++ b/Library/Homebrew/dependency.rb @@ -82,6 +82,8 @@ class Dependency            next []          when :skip            expand(dep.to_formula, &block) +        when :keep_but_prune_recursive_deps +          [dep]          else            expand(dep.to_formula, &block) << dep          end @@ -110,6 +112,11 @@ class Dependency        throw(:action, :skip)      end +    # Keep a dependency, but prune its dependencies +    def keep_but_prune_recursive_deps +      throw(:action, :keep_but_prune_recursive_deps) +    end +      def merge_repeats(deps)        grouped = deps.group_by(&:name)  | 
