diff options
| author | Uladzislau Shablinski | 2016-10-20 01:50:59 +0300 |
|---|---|---|
| committer | Uladzislau Shablinski | 2016-10-20 03:09:23 +0300 |
| commit | 0ae1785703cc816725c78bbff4b390b918d6fd29 (patch) | |
| tree | 693169d0f71c850c1926f17dc688ec1065611d32 /Library/Homebrew/cask/spec/support/Casks/with-embedded-binary.rb | |
| parent | fb29a31c72a21bb4cae0b5830ce3407e3a3d068e (diff) | |
| download | brew-0ae1785703cc816725c78bbff4b390b918d6fd29.tar.bz2 | |
formula: use names for formula comparison
* Causes a bug in Formula#installed_alias_target_changed? when
Formula#superseds_an_installed_formula? returns true because
Formula#old_installed_formulae includes f for some Formula f.
* Causes a bug when foo@2.4 with alias foo has HEAD or devel version and
we try to `brew upgrade foo --devel|--HEAD` from stable. The upgrade fails
while since we installing formula to the same prefix it's alredy installed.
The reason for that is that we use
`formula_to_install = outdated.map(&:latest_formula)` in cmd/upgrade
before calling upgrade_formula on foo.
```ruby
def latest_formula
installed_alias_target_changed? ? current_installed_alias_target : self
end
```
Formula#installed_alias_target_changed? compares formulae using
Formula#==, which is wrong for this case, thus Formula#latest_formula doesn't
return self and returns Formula#current_installed_alias_target with spec
foo was initially installed instead of devel or HEAD, causing the error.
Diffstat (limited to 'Library/Homebrew/cask/spec/support/Casks/with-embedded-binary.rb')
0 files changed, 0 insertions, 0 deletions
