Before this, `sudo brew cask` will auto install Homebrew cask as root
user. This will cause permission problem for files in `Tap` directory.
Therefore, let's check process uid and switch to normal user for tap.
As result, `sudo brew cask` will work as the same before, except tap
files will have the correct permission attributes.
ClosesHomebrew/homebrew#48059.
Signed-off-by: Xu Cheng <xucheng@me.com>
Add two checks:
* revision should be reset to 0 for new version.
* revision should not decrease inside the same version interval.
ClosesHomebrew/homebrew#48032.
Signed-off-by: Xu Cheng <xucheng@me.com>
If `head` sections contains commas (e.g. `url "https://github.com/tarantool/tarantool.git", :branch => "1.6", :shallow => false`)
then re thinks that it reached the end and inserts `bottle do <-> end`
block before it, that leads to problems in ` brew audit --devel tarantool --strict --online`:
```
==> audit problems
tarantool:
* `head` (line 11) should be put before `bottle block` (line 7)
```
It blocks Homebrew/homebrew#47495ClosesHomebrew/homebrew#47931.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This feature is still quite useful, particularly because of the somewhat
buggy behaviour of `default_formula` which means when attempting to build
a bottle it'll attempt to force the installation of that formula.
That is particularly problematic for taps like homebrew/homebrew-fuse because
the `default_formula` in osxfuse conflicts with the osxfuse binary we install
via the Caskroom, which is actively breaking every CI build.
ClosesHomebrew/homebrew#48000.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This was caused by a "race" between two commits.
bash-3.2$ git log -n1 --format=%ai 3344229
2012-08-15 22:08:40 -0500
bash-3.2$ git log -n1 --format=%ci 3344229
2012-09-17 20:01:37 -0500
bash-3.2$ git log -n1 --format=%ai 8837423
2012-08-25 11:31:57 -0700
bash-3.2$ git log -n1 --format=%ci 8837423
2012-08-25 11:52:37 -0700
"built_bottle" was renamed "built_as_bottle" in 8837423 after the date
3344229 was authored but before the date it was committed to master, and
unfortunately in the interim 3344229 hadn't been updated to reflect the
name change.
This commit changes the Formula class's to_hash method to use
tab.built_as_bottle not tab.built_bottle, which doesn't exist. At this
time, there is no way that to_hash could have known that
tab.built_bottle is bogus. Perhaps this could be made safer in the
future, so that non-existent methods cause an error here rather than
just silently returning null.
ClosesHomebrew/homebrew#47912ClosesHomebrew/homebrew#47916.
Signed-off-by: Xu Cheng <xucheng@me.com>
Adding a strict check for usage that should be using pkgshare.
Pulled onto two unique checks to provide a better problem message, with a
clearer solution, but open to thoughts.
* Use pkgshare instead of (share/"example")
* Use #{pkgshare} instead of #{share}/example
ClosesHomebrew/homebrew#47900.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
Setting the `FC` environment variable allows the user to override the
default Fortran compiler. The `SharedEnvExtension#fortran` method then
checks whether any of `FCFLAGS` and `FFLAGS` environment variables are
set and, if not, suggests to use `--default-fortran-flags` when running
`brew install`. However, `--default-fortran-flags` never makes it to
`build.rb` (that is executed by `FormulaInstaller`) because the flag is
not whitelisted in `FormulaInstaller#sanitized_ARGV_options`.
This change rectifies this and thereby eliminates the confusing message.
FixesHomebrew/homebrew#47852.
Some (rather slow) checks should run after all other checks. Make that
more obvious by removing them from the sorted list of all checks and
then re-appending them to the resulting list. (Should be slightly more
efficient than the `<array>.reverse.uniq.reverse` incantation, though
that hardly matters given the cumulated run time of all the checks.)
Slightly extend the list after verifying what the slowest checks are for
various Homebrew installations (slowest check last).
ClosesHomebrew/homebrew#47753.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Use FormulaAuditor.audit_prefix_has_contents from audit.rb, which has
better logic.
ClosesHomebrew/homebrew#47678.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Abbreviations will be longer if needed to preserve uniqueness.
This makes it more consistent with `git rev-parse --short`,
https://github.com/Homebrew/homebrew/commits, etc.
For example, instead of:
Updated Homebrew from 40d1e9c2 to 90b9bdf4.
We see:
Updated Homebrew from 40d1e9c to 90b9bdf.
See 0c48248b6555353c8d60b61973639c8423ce586c for the original
introduction of eight-character abbreviations.
Those are created by the `ruby` formula in core and various Ruby
formulae from `homebrew/versions` and contain Gems and other stuff that
is to be retained across updates. Treat it like Python in this regard.
This avoids spurious output in `brew list --unbrewed` when a brewed
`ruby` is used to, e.g., install Gems.
ClosesHomebrew/homebrew#47750.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Treat it like the cache, i.e., if the logs directory is inside the
Homebrew prefix, skip it instead of listing all the logs.
This avoids spurious output in `brew list --unbrewed` when the Homebrew
logs directory is a subdirectory of the Homebrew prefix.