- Make copying to `*_names.before.txt` the responsibility of `update.sh`
(unless the file doesn't exist at all). This provides the added
benefit of allowing the inspection of the before/after state after
running a `brew update` rather than both files always being identical
at this point.
- State `No changes to formulae or casks.` on macOS.
- Rename and flip `updated_formula_report` to `auto_update`; this naming
was confusing every time.
- Only display the `You can upgrade with...` messaging if we're not
auto-updating as sometimes it will be displayed before the commands it
references (e.g. `upgrade`, `outdated` or an `install` that proceeds
to upgrade these formulae).
Fixes https://github.com/Homebrew/brew/issues/15065
If we're installing from the API: we cannot use Git to check for differences in
packages so instead use `{formula,cask}_names.txt` to do so.
The first time this runs: we won't yet have a base state
(`{formula,cask}_names.before.txt`) to compare against so we don't output
anything and just copy the files for next time.
- Change name of rubocop warning
- Disable linting on remaining offending lines
- Add todos to move lines with disabled linting
checks to extend/os in the future
This is not necessary.
In addition,
1. Avoid an error when `formula.tap` is `nil`.
2. Use the more suggestive `gcc.dep.rpaths.migrated` as the setting
name.
When GCC 12 ships (Homebrew/homebrew-core#106755) ships, most (all?)
Linux bottles that depend on GCC will break.
Let's fix that by using the same trick for handling divergent formula
revisions when migrating formulae from linuxbrew-core (#11982). We set
the recorded `version_scheme` to -1, which spoofs the formula being
outdated. When `brew upgrade` installs GCC 12, the broken formulae will
have their bottles reinstalled too.
This works because the reinstallation will also rewrite the existing
RPATHs to point to the new version of GCC instead (#13631). This should
handle most of the breakage.
Highlight release notes when the current version is updated to a newer
version (either major or minor) not just when revision version is zero
(e.g. x.x.0).
Only show new formulae or casks when HOMEBREW_UPDATE_REPORT_ALL_FORMULAE
environment variable is set.
Stop checking for HOMEBREW_UPDATE_REPORT_ALL_FORMULAE when the key is
:R, :A or :AC in ReporterHub#dump_formula_or_cask_report because
that check is made redundant by the check in ReporterHub#dump.
From reading https://github.com/orgs/Homebrew/discussions/3328: I
initially thought we should just change "Updated" to "Modified" when
appropriate. After conversation with Bo98, though, I thought more and
saw that we're already checking for outdated formulae here so, rather
than ever traverse through the formula history, look at the outdated
formula and list them unless we've set
`HOMEBREW_UPDATE_REPORT_ALL_FORMULAE` in which case we show the
modifications.
While we're here, also do a bit of reformatting and renaming to better
clarify intent.
- Rename use of "preinstall" to "auto update". The original "preinstall"
naming came from the fact that we used to only auto-update before
`brew install` but now that it's many commands: this is more confusing
than useful.
- Add `HOMEBREW_NO_UPDATE_REPORT_ONLY_INSTALLED` and remove
`HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED`; the latter is now the default
and the prior provides an opt-out for better output, performance and
avoiding reading potentially untrusted formulae.
- Add `HOMEBREW_UPDATE_FORMULA_VERSION_CHECKS` and don't check formula
versions by default for better performance by default.
Co-authored-by: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com>
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>