aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorMike McQuaid2017-01-17 10:43:43 +0000
committerMike McQuaid2017-01-17 10:50:04 +0000
commitdac66c4ada178c09b3b9b77feb2eaa7442b7443e (patch)
treea40def8efa0738a85dabc40f76e88e22b3728424 /Library/Homebrew/dev-cmd
parenteece7706d16920443d490013ba989a66028a62f3 (diff)
downloadbrew-dac66c4ada178c09b3b9b77feb2eaa7442b7443e.tar.bz2
Add `keg_only :versioned_formula`.
This is used to indicate a formula is a version of another formula. This will be used to provide a consistent interface for older formulae versions and replaces the use of `conflicts_with`.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 394e0e763..281839621 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -459,6 +459,14 @@ class FormulaAuditor
end
def audit_conflicts
+ if formula.versioned_formula?
+ problem <<-EOS
+ Versioned formulae should not use `conflicts_with`.
+ Use `keg_only :versioned_formula` instead.
+ EOS
+ return
+ end
+
formula.conflicts.each do |c|
begin
Formulary.factory(c.name)
@@ -497,7 +505,7 @@ class FormulaAuditor
return unless @new_formula
return if formula.deprecated_options.empty?
- return if formula.name.include?("@")
+ return if formula.versioned_formula?
problem "New formulae should not use `deprecated_option`."
end