Sometimes we accidentally install files outside prefix. After we fix that,
users will get nasty link conflict error. So we create a whitelist here to
allow overwriting certain files. e.g.
link_overwrite "bin/foo", "lib/bar"
link_overwrite "share/man/man1/baz-*"
During FormulaInstaller#link, the whitelist conflict files will be
backup into HOMEBREW_CACHE/Backup
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?
Before
```
$ time brew readall
brew readall 10.63s user 0.36s system 99% cpu 11.003 total
```
After
```
$ time brew readall
brew readall 5.62s user 0.24s system 99% cpu 5.859 total
```
ClosesHomebrew/homebrew#42302.
Signed-off-by: Xu Cheng <xucheng@me.com>
One minor consequence of our seizing of the HOME variable during builds for
sandboxing purposes is that if you're doing an interactive or git installation
zsh flags up that it hasn't found any config files and throws you into the
`zsh-newuser-install` area.
Not really a problem, just a nuisance.
Since the check is just for existence rather than content, we can work around
this by creating an empty config file when the `SHELL` environmental variable
includes zsh.
Dependency is another similar, related class and it's super confusing
to have some Requirements that are named *Dependency.
ClosesHomebrew/homebrew#38891.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
* Library/Homebrew/caveats.rb: add caveats comparable to other shells
* Library/Homebrew/formula.rb: define completion directory along the
conventions explained in the fish documentation for
$fish_complete_path
* Library/Homebrew/keg.rb: add fish shell to check function for
installed completions
ClosesHomebrew/homebrew#39828.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Moves from None to Release, but comments out the standard release
CFLAGS so we can continue using our own.
Bumped Libgit2 as an example/test to play with.
ClosesHomebrew/homebrew#37332, hopefully.
ClosesHomebrew/homebrew#37361.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Formulas that build python things and which are tested with system
Python will encounter test failures unless system Python is configured
to add Homebrew's site-packages to sys.path. This change makes sure that
configuration is performed in the test environment.
Both lines are needed; the first reads and processes .pth files and the
second makes sure that Homebrew's site-packages is read before the
system extras, so that formulas depending on Homebrew/python/numpy get
the Homebrew/python version and not the old system version.
ClosesHomebrew/homebrew#38466.