Module: DeprecateDisable Private

Defined in:
deprecate_disable.rb

Overview

This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.

Helper module for handling disable! and deprecate!.

Constant Summary collapse

DEPRECATE_DISABLE_REASONS =

This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.

{
  does_not_build:      "does not build",
  no_license:          "has no license",
  repo_archived:       "has an archived upstream repository",
  repo_removed:        "has a removed upstream repository",
  unmaintained:        "is not maintained upstream",
  unsupported:         "is not supported upstream",
  deprecated_upstream: "is deprecated upstream",
  versioned_formula:   "is a versioned formula",
  checksum_mismatch:   "was built with an initially released source file that had " \
                       "a different checksum than the current one. " \
                       "Upstream's repository might have been compromised. " \
                       "We can re-package this once upstream has confirmed that they retagged their release",
}.freeze

Class Method Summary collapse

Class Method Details

.deprecate_disable_info(formula) ⇒ Object

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'deprecate_disable.rb', line 25

def deprecate_disable_info(formula)
  if formula.deprecated?
    type = :deprecated
    reason = formula.deprecation_reason
  elsif formula.disabled?
    type = :disabled
    reason = formula.disable_reason
  else
    return
  end

  reason = DEPRECATE_DISABLE_REASONS[reason] if DEPRECATE_DISABLE_REASONS.key? reason

  [type, reason]
end