By directly modifying the results array with
`results[i] = "#{name} (installed)"`, it appeared on successive
iterations that the canonical name was no longer in the array, so
aliases were not removed.
See 9efe5b554c (commitcomment-12969631)ClosesHomebrew/homebrew#43433.
`brew search emacs`, with homebrew/emacs tapped:
```
real 0m2.586s
user 0m1.138s
sys 0m0.121s
```
Previously:
```
real 0m2.831s
user 0m1.385s
sys 0m0.087s
```
`brew search s`:
```
real 0m2.260s
user 0m1.201s
sys 0m0.114s
```
Previously:
```
real 0m5.953s
user 0m4.827s
sys 0m0.226s
```
ClosesHomebrew/homebrew#35696.
ClosesHomebrew/homebrew#42662.
For update, all formula loading need to be secured by `rescue`.
Otherwise it's easy to crash `brew update` for vasty reasons, e.g.
new Formula DSL.
ClosesHomebrew/homebrew#43353.
Signed-off-by: Xu Cheng <xucheng@me.com>
If the user's working copy is *not* on the 'master' branch, the revision
recorded after the update to the 'master' branch is not the one of the
updated 'master' branch but that of whatever the user's current branch
is. This tends to be not very helpful.
This change records the revision *after* the update to the 'master'
branch, but *before* switching back to the user's current branch prior
to the update, effectively causing the report to show changes to the
'master' branch.
ClosesHomebrew/homebrew#42074.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Fixes test-bot mishandling of optional cross-tap dependencies. Without
this change, since formula.stable.deps includes the optional dependencies but
formula.recursive_dependencies does not, test-bot was trying to select a
compiler for an untapped formula, which raised an error.
Our suspect handling of optional dependencies was exposed by Homebrew/homebrew#43145 /
7184348e822d6745d8a103de104ff9626536bf1e.
ClosesHomebrew/homebrew#43237.
Long term it would be nice to sandbox everything that writes to DerivedData
but it is essentially a cache directory of sorts.
The downside of allowing stuff to write there particularly is that DerivedData
is notoriously bad at getting cleaned up, so if you do a lot of Xcode-using
installations very quickly, you can chew your disk space up.
ClosesHomebrew/homebrew#43276.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
Use an exponential back-off on the sleep and try the fetch more times.
Hopefully this will mean that we spent less time waiting for Bintray.
ClosesHomebrew/homebrew#43240.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
add guard in Formula#file_modified? to prevent git popup
add guard in Superenv.bin before calling MacOS::Xcode.version
add guard against missing Xcode/CLT in Xcode.uncached_version
return nil instread of 0 in uncached_version when Xcode/CLT are not present, to distinguish from linuxbrew behavior
checks against pour_bottle? and needs_relocation?, add guard around keg.relocate_install_names to check pour_bottle?/needs_relocation? as well
needs_relocation? becomes skip_relocation?, use cellar attr to indicate relocation instead of does_not_need_relocation
MacOS.can_build? becomes MacOS.has_apple_developer_tools?
Add these new errors, and guards in formula installation and
cmd/{,un,re}install to match, move can_build? to the MacOS module,
flatten conditions, remove redundant can_build? check
reinstate removed (doctor) check
Install it as a dependency unless already satisfied by Xcode.
require cctools_requirement
cctools_requirement should be satisfied by cctools present in opt
add build_env => false to the satify block options in CctoolsRequirement
Before
```
$ time brew cleanup -s
brew cleanup -s 0.73s user 3.52s system 58% cpu 7.297 total
```
After
```
$ time brew cleanup -s
brew cleanup -s 0.69s user 2.57s system 139% cpu 2.341 total
```
ClosesHomebrew/homebrew#42968.
Signed-off-by: Xu Cheng <xucheng@me.com>
After the formula gets renamed oldname opt is created and
it points to the linked keg. However if we then upgrade newname
oldname opt still points to the same keg it pointed before upgrade.
The commit fixes this behaviour thus that oldname opt links at the
same keg opt point.
Change behavior for `brew cleanup` as follows:
- If `--force` is supplied, remove only outdated keg-only packages.
- If `--prune=<days>` is supplied, remove both logs and cached downloads
older than the specified number of days. Use `--prune=all` to remove
all logs and cached downloads irrespective of age.
- By default, remove logs after 14 days and cached downloads never.
Also centralizes handling of `--prune`, thus removing duplicate logic.
This is motivated by commit 17eee232838d4639b25f863aa342b1dda61b81bc
that made `--force` much more aggressive and made it override whatever
was specified via `--prune`, completely removing all:
- outdated keg-only packages
- cached downloads irrespective of age
- logs irrespective of age
This made it impossible to remove outdated keg-only packages without
also deleting all cached downloads, which is at least inconvenient for
people with limited bandwidth wanting to rebuild packages later.
ClosesHomebrew/homebrew#42970.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>