Show the top-level formula header whenever any dependency was
installed first, not only when there were two or more, so the
transition from a dependency build to the formula build is clear.
Also format long build durations as hours and minutes and drop the
seconds once past five minutes, showing at most two units.
`brew info <formula>` marked installed dependencies with a green ✔ but
left uninstalled ones (e.g. `llvm`) as plain text, so they were easy to
miss among the ticks.
Give `pretty_install_status` a nilable `bold:` flag:
- `true` bold every entry, installed or not
- `false` never bold any entry
- `nil` (default) bold installed entries only
`brew info`'s header and its dependency/requirement listings pass
`bold: true`, so the formula name and all of its deps render bold whether
or not they are installed. A dependency's red ✘ still only appears when
the formula itself is installed and the dependency is missing. Add a
`pretty_unmarked` helper for the bold-but-unmarked case.
Group `brew upgrade --dry-run` dependencies into separate "Would install"
and "Would upgrade" sections aligned with format_upgrade_summary, and read
the installed version from the kegs so unlinked upgrades still show
"old -> new".
Also stop the first dependency in the "Installing dependencies for" line
from rendering bolder than the rest.
The default view lists a single version line per formula, so the
"Installed Versions" title fits it better. Keep the existing
"Installed Kegs and Versions" title for --verbose, which lists each
individual keg with its tab details.
When a formula's possible names include both a rack and a symlink to
that same rack (e.g. Cellar/python3 -> Cellar/python via the python3
alias), every keg under it was discovered once per name, so brew info
listed each installed version twice. Dedupe the Cellar directories by
their resolved physical path before collecting subdirs.
Only show the newest keg of each formula plus any linked keg in the
"Installed Kegs and Versions" section by default. Older, non-linked
kegs are listed only with --verbose.
When a dependency's soname bumps and the old dylib is removed, an
installed formula's binaries can be left linking against a library
that no longer exists, aborting at load time with a dyld error.
Surface this in the `brew info` Dependencies section for installed
formulae as a "Missing libraries" line, marking each library with a
red ✘ like other dependency statuses. The fix suggestion is
`brew upgrade` when the formula is outdated (which also relinks it)
and `brew reinstall` otherwise. The libraries are read from the
existing LinkageChecker, combining broken dependencies (dylibs under
opt/<dep>/) and broken dylibs that map to no dependency.
`pretty_install_status` already gates the upgradable status on
`installed && outdated`, so callers passing
`outdated: installed && formula.outdated?` duplicated the guard.
Pass `outdated: formula.outdated?` directly and let the method
combine it with `installed`.
The install dependency list is already a plain "would install" list,
so bolding the upgradable entries made them stand out inconsistently
from the fresh installs. Add a `bold:` option to `pretty_upgradable`
and `pretty_install_status` (defaulting to `true` to preserve `brew
info` styling) and pass `bold: false` from the install plans.
Show installed-but-outdated dependencies with the upgradable status
already used by `brew info`, so the install dependency list signals
an upgrade rather than looking like a fresh install.
Several commands carried parallel formula/cask branches doing the same
thing through different method names. Add shared methods and route the
duplicated logic through them:
- reloadable_ref on Formula and Cask returns the ref re-fed to
Formulary.factory / Cask::CaskLoader.load when reloading for another
os/arch, replacing the inline loaded_from_api? check in fetch and
--cache (now one reload loop).
- Formula#installed? aliases any_version_installed? to match
Cask#installed?, letting tab and uses drop their type branches.
- Utils::Bottles::Tag.from_arg centralises the --bottle-tag-or-os/arch
idiom shared by fetch, --cache and verify.
- unpin, missing and home iterate formulae and casks in one loop.
When two taps have a formula with the same name, passing both the
plain name and the tap-qualified name only showed one of them. Both
names point to the same formula, so they were merged into one before
`brew info` could swap the plain name to show the installed
(shadowing) version. Now keep both, do the swap first, then merge only
formulae with the same full name. So the two names show separate
blocks, but repeating the same name still shows one.
When two taps provide a formula of the same name they share one
cellar rack, so only one can be installed at a time. Running
`brew info <tap>/<name>` on the formula that did NOT install the keg
previously showed that keg as this formula's install and `[Linked]`.
Now show such a formula by its full (tap-qualified) name, mark it not
installed, and list the shadowing formula's keg under "Installed Kegs
and Versions" so the actually-installed sibling is still visible.
Resolve each conflict to its actual formula and show the resolved
full name, so a conflict that points to a formula in another tap is
unambiguous rather than a bare name. When a conflict resolves to the
formula itself (e.g. hashicorp/tap/terraform's `conflicts_with
"terraform"` after terraform left homebrew-core), omit it instead of
printing a confusing self-conflict.
The red ✘ uninstalled marker reads as an error, but in some places
uninstalled is the norm rather than a problem:
- tap-info: every uninstalled formula/cask in the tap catalog
- brew info <pkg>: deps and requirements when the package itself is
not installed (the listing just shows what would be pulled in)
Add a 'mark_uninstalled:' parameter to 'pretty_install_status' that,
when false, returns the plain string instead of the red ✘. Pass it
through 'decorate_dependencies'/'decorate_requirements' in both
'cmd/info' and 'cask/info', and use it unconditionally in 'tap-info'.
Keep the marker where missing really signals a problem: info headers,
deps/requirements of an installed package, and update reports for
removed entries.
Match the '(deprecated)'/'(disabled)' suffix already shown by
'brew search'. Apply it via 'pretty_install_status' so it shows in the
'brew info' title and 'brew tap-info' formula/cask listings, and
refactor 'brew search' to use the same helper.
Avoid a standalone ohai header for what is logically a sub-section of
Dependencies; render it as a single 'Dependents (N): ...' line, matching
the sibling Required/Recursive Runtime lines.
Render the dependents as a tabular `==> Dependents (N)` section under
`--verbose`, matching the existing `Binaries` block. Non-verbose output
is unchanged.
Trigger the bottle manifest fetch under `--verbose` so users don't
need to combine `-v` with `--fetch-manifest`. Mirrors how `-v`
already pulls analytics inline.
List the formula's bin/ and sbin/ executables in a new `==> Binaries`
section before `==> Caveats`. For installed formulae the list is read
from the linked keg; for not-installed formulae `--fetch-manifest`
triggers a fallback that reads from the bottle manifest, mirroring
how `Bottle Size` and `Installed Size` already behave.