Merge pull request #2523 from MikeMcQuaid/remove_formula_installer_feature_flags

formula_installer: remove feature flags.
This commit is contained in:
Mike McQuaid 2017-04-22 12:47:02 +01:00 committed by GitHub
commit 10d70aa93a

View File

@ -173,34 +173,22 @@ class FormulaInstaller
EOS EOS
end end
if ENV["HOMEBREW_CHECK_RECURSIVE_VERSION_DEPENDENCIES"] version_hash = {}
version_hash = {} version_conflicts = Set.new
version_conflicts = Set.new recursive_formulae.each do |f|
recursive_formulae.each do |f| name = f.name
name = f.name unversioned_name, = name.split("@")
unversioned_name, = name.split("@") version_hash[unversioned_name] ||= Set.new
version_hash[unversioned_name] ||= Set.new version_hash[unversioned_name] << name
version_hash[unversioned_name] << name next if version_hash[unversioned_name].length < 2
next if version_hash[unversioned_name].length < 2 version_conflicts += version_hash[unversioned_name]
version_conflicts += version_hash[unversioned_name]
end
unless version_conflicts.empty?
raise CannotInstallFormulaError, <<-EOS.undent
#{formula.full_name} contains conflicting version recursive dependencies:
#{version_conflicts.to_a.join ", "}
View these with `brew deps --tree #{formula.full_name}`.
EOS
end
end end
unless version_conflicts.empty?
unless ENV["HOMEBREW_NO_CHECK_UNLINKED_DEPENDENCIES"] raise CannotInstallFormulaError, <<-EOS.undent
unlinked_deps = recursive_formulae.select do |dep| #{formula.full_name} contains conflicting version recursive dependencies:
dep.installed? && !dep.keg_only? && !dep.linked_keg.directory? #{version_conflicts.to_a.join ", "}
end View these with `brew deps --tree #{formula.full_name}`.
EOS
unless unlinked_deps.empty?
raise CannotInstallFormulaError, "You must `brew link #{unlinked_deps*" "}` before #{formula.full_name} can be installed"
end
end end
pinned_unsatisfied_deps = recursive_deps.select do |dep| pinned_unsatisfied_deps = recursive_deps.select do |dep|