- Use .required? instead of .tags.empty?
- use .public_send
- modify .reject_ignores to be .select_includes
- checks ignores first now
- Don't use runtime deps with --missing in `brew deps` command
- unify core tapping/untapping behaviour (so we can never tap and then
immediately untap)
- automatically untap homebrew-core or homebrew-cask if it's old, on
the default branch and it doesn't seem to be needed
- if we think it's unneeded but it's too new: output a message instead
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
My understanding is that now https://github.com/Homebrew/brew/pull/15778
has been merged this should now work fine on both older macOS versions
and non-default prefixes so let's try this again.
If a formulae or cask is marked as both added and deleted, we've just
incorrectly detected it. Remove it from the report.
This can happen when a formula or cask is moved around in the repository
e.g. with sharding.
- Fix cask info output being incorrect
- Improve some code referring to casks as formulae
- Move livecheck cask fixtures to not shadow existing names
- Adjust the cask tap symlinking logic to make handling outdated
shadowed casks significantly easier
- Fix various flaky tests caused by casks sharding logic
- Prefer longer paths when there's multiple formulae or casks in a tap
with the same name rather than always using the first
Clarify that the deleted formulae/casks when not using `report_all`
are only those that have been deleted _and_ the user has them
installed. This should avoid users glossing over this information as
it is pretty relevant to them.
While we're here, refactor some of the `report_all` logic to make it
easier to remove it all on the next Homebrew major/minor version.
- Load paths with no API when needed (e.g. for `brew edit`)
- Use no API mode for `brew log` as it's needed there
- Define sharding format for homebrew-cask and homebrew-core inside
`Tap` methods
- Create new formulae/casks in location defined by these `Tap` methods
- Fix a bug in Formulary that made sharded formulae lookup less
efficient (and possibly broke it for core and some API usage)
- Fix various other hardcoded Formula/Cask directory assumptions
Co-authored-by: Bo Anderson <mail@boanderson.me>
- warn if running `brew postinstall` explicitly and there's no
`post_install` defined in the formula
- add a `post_install` alias for `brew postinstall` to make life
easier for those jumping between `postinstall` and `post_install` in
e.g. Homebrew development
- refactor `post_install` formula path logic into a new method for
improved readability
- handle the JSON API `post_install` formula path case
When we're automatically setting `HOMEBREW_NO_INSTALL_FROM_API`
when on an old macOS version or with a non-default prefix (e.g. cases
where you're going to be mostly building from source).
My initial plan was to set
`HOMEBREW_AUTOMATICALLY_SET_NO_INSTALL_FROM_API` in these cases but
it's used differently enough it made sense to add another internal
variable instead: `HOMEBREW_INSTALL_FROM_API_UNSUPPORTED`.
At the moment this is only used to avoid printing the "You have set
`HOMEBREW_NO_INSTALL_FROM_API`" message inside `brew update` but may
make sense to use in other places over time.
Ideally, we'll get rid of these automatic sets of
`HOMEBREW_NO_INSTALL_FROM_API` and perhaps even the variable entirely.
Previously, the behavior was to warn users that a cask was already
installed and then skip modifying the installed version. This is
different to how we handled things with formulas. For them we would
upgrade any already installed formulas. This just brings casks in line
with what we already do with formulas.
Changes:
- cmd/install: Upgrade already installed casks if HOMEBREW_NO_INSTALL_UPGRADE
is not set
- env_config: Update wording of HOMEBREW_NO_INSTALL_UPGRADE to include casks
- remove error that was only used to alert about already installed casks
Note:
- The upgrade command for casks defaults to --greedy when you pass named casks
to the command which means that this will always default to that behavior
since you must specify the name of the cask when installing.
I was looking for a way to suppress output in `brew cleanup` especially the `Warning: Skipping XXX: most recent version X.Y.Z not installed`. I noticed that `Homebrew::Cleanup#clean` takes a `quiet` argument, but `brew cleanup` doesn't pass one in. This PR updates `brew cleanup` to accept and forward along a `quiet` argument.
This is useful for quickly examining bottles with something like
brew fetch --bottle-tag=$tag $formula && \
tar xf "$(brew --cache --bottle-tag=$tag $formula)"
See discussion at #15632.
Download the previously stored tap migrations files for homebrew/core
and homebrew/cask from the formulae.brew.sh API.
This adds a much longer stale time (24 hours) to decide whether or not
the migrations files need downloaded from the API in Ruby land.
`brew update` will still update them every time.
Requires https://github.com/Homebrew/brew/pull/15628
Fixes https://github.com/Homebrew/brew/issues/14897
Similar to `rbenv-sync` and `nodenv-sync`, but for use with `pyenv`.
Python has separate formulae for minor Python versions, as such this
will symlink all patch versions to the latest minor version.
Move the `names*.txt` files even when the file size hasn't changed
(which can happen when the versions change in the API but the file
size doesn't change).
Fixes#15217
While we're here, also add some whitespace for easier reading.