No longer output every cask under the list of changed formulae but
instead create a dedicated, unprinted report section for casks and then
iterate through that instead.
Do this to ensure that any symlinks in the Homebrew prefix and/or in
Applications are removed to stop issues with stale symlinks causing
Casks from being installed correctly.
- When running `brew update` and there’s been no changes from upstream
on any repositories there’s no need to call the (relatively) slow `brew
update-report` when we already know what it will say (“Already up-to
date.”).
- When any`git fetch`es fail then throw out an error at the end of the
output and produce a failing exit code (closes#65).
This prevents `brew` self-calls from interacting with the stickiness of
HOMEBREW_NO_ANALYTICS being persisted to the brew repo and accidentally
disabling analytics permanently when it should have been for just one run,
while restoring the stickiness of an explicit user-supplied
HOMEBREW_NO_ANALYTICS.
Provide a single command that can be run to disable analytics, run it if
`HOMEBREW_NO_ANALYTICS` is ever set and remove the user UUID file in
that case too.
References https://github.com/Homebrew/brew/issues/142.
Make sure that users are notified on the first run of `brew update`
after we enabled analytics about how it works and how to opt-out. This
will be shown to all users who have not already seen this message from
`brew update` or through a new Homebrew installation.
References https://github.com/Homebrew/install/pull/42
References https://github.com/Homebrew/brew/issues/142
Also, slightly tweak the behavior of `brew update` in this case so that
it doesn't print annoying output and still allows the `brew edit` flow
for people with `HOMEBREW_DEVELOPER` set.
We don't need to migrate the tapped formulae from symlink-based to
directory-based structure any more.
Instead, we add core tap install check for `brew update-report` which
will be invoked by `brew update`.
* Better variable/class name. `update-report` isn't response to actual
update.
* Use abstraction offered by Reporter and ReproterHub class.
* Failure on one tap won't affect migration preformed by other taps.
* Simplify logic and prepare for core/formula separation.
* Better variable/class name.
* Remove obsolete update_renamed, this is now handled inside each
reporter.
* Remove obsolete formula file path to name computation, which is also
handled by reporter.
* Hide low lever implementation detail to offer better abstraction.
Use `add(reporter)` instead of `Hash#update` to add new report.
* Avoid tons of unnecessary file path manipulation. Use abstraction
offered by Tap class if possible.
* Handle formula rename/tap migration inside reporter in per tap basis.
* Avoid duplicated computation.
* Remove redundant/dead code.
Allow people to run this command (so we can ask people to test it)
without having to set `HOMEBREW_DEVELOPER`.
ClosesHomebrew/homebrew#48260.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
* use HOMEBREW_REPOSITORY instead of HOMEBREW_PREFIX
* better performance:
* update-bash: avoid shellout
* update-report: use strip_prefix and tr
* more robust:
* explicitly handle the case when repo is HOMEBREW_REPOSITORY to avoid
to handle the trailing backslash.
* handle both lower case and upper case when stripping non alpha and
digital characters.