Rather than just checking if a requirement's dependency is installed or
not check if the requirement was actually satisfied by a particular
formula rather than e.g. just having a `default_formula` defined.
Lets us migrate a formula to a name that may have previously been used.
If gnupg 1.x is installed as "gnupg" and gnupg 2.x is installed as
"gnupg2," it's currently not possible to rename gnupg2 -> gnupg, since
the 1.4 keg will already be installed in the "gnupg" Cellar, so in order
to reclaim the name "gnupg" to be used for 2.1, either 1.x must be
manually uninstalled, or the new cellar needs to be allowed to exist
already.
The existing `brew.1.html` wasn't particularly pleasant to read and
given everything else in `docs/` is a Markdown file it makes sense to
generate a post-processed Markdown file that can in turn be used by
Jekyll to generate a nicely themed HTML file.
Ensure the full HOMEBREW_TAP_DIR path is created before deleting and
creating the symlink for it. This ensures that non-`homebrew` taps will
have the necessary username/organisation folder created.
Fixes#2378.
Setting `HOMEBREW_TEMP` env. var [currently] breaks tests (`brew
tests`). Although this behavior looks like a bug, the solution is
straightforward: unset `HOMEBREW_TEMP`.
Unmigrated formulae cause hard-to-debug issues and relying on detection
on Git alone is faster but not comprehensive. Instead, iterate through
renamed, installed formulae every time and migrate them.
Closes#1770.
This has known issues with our `ghostscript` formula, we can't test it
on CI and is a ludicrously heavy dependency that in many cases can be
avoided by upstream providing prebuilt documentation.
The implementation of the reinstall command was the same as
Installer#install, aside from the uninstall of the existing cask.
Moved this within the class to DRY up the implementation.
Avoids unnecessary conflicts when a previously non-keg_only formula is
in the way by prioritizing keg_only before non-keg_only formulae.
This change is motivated by the upgrade of gnupg 2.0 to 2.1, since the
latter no longer depends on the gpg-agent formula, which, even if made
keg_only, still causes the link step to fail for 2.1, as gpg-agent's
non-keg version won't have been upgraded to the keg_only version at that
point (alphabetically gnupg precedes gpg-agent).
Previously, the http_content_headers_and_checksum method always
downloaded the entire url, including headers. These downloads
periodically hang, outputting false positives or wreaking havoc on
the CI. Therefore, use curl's --max-time arg to prevent this by
setting a hard limit of 600 seconds when the entire file is going
to be used to detect whether the url can be changed to use the HTTPS
protocol instead of HTTP. Otherwise, if the url already is HTTPS, limit
the download time to 25 seconds since only the headers, not contents, matter.