If the environment variable HOMEBREW_TEST_GENERIC_OS is set ensure that
neither Mac nor Linux-specific code is loaded. This allows easier
testing of cross-platform code on OS X and will make it easier to port
Homebrew to platforms other than OS X and Linux.
This is in part designed to handle situations described in https://github.com/Homebrew/legacy-homebrew/issues/42273
where we tell someone to install a special dependency, but because we (rightly, IMO)
resolve special dependencies first users can end up being told to execute a command
on a tool that isn't yet installed and isn't immediately obvious how to install it.
In the situation raised there, with the `sile` formula people are being told to
`luarocks install xyz` but we hadn't installed Lua for them first, so they just
get a `command not found: luarocks` message. Perhaps it should be obvious enough
how to install said tools by looking at the formula's dependencies,
but it's not a huge burden on us to make life easier than that.
Shuffled over from https://github.com/Homebrew/legacy-homebrew/pull/42576.
- Reorder listed commands to better reflect a typical workflow (search,
then query for details via `info` and friends, then install, later
update and upgrade, at last maybe uninstall).
- Remove niche `pin` and `unpin` commands.
- Drop `--env` in the Troubleshooting section.
And use `/REGEX/` instead of `/PATTERN/` to be clearer what is expected.
Closes#177.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
This primarily benefits CLT-only systems where invoking the `xcodebuild`
wrapper in `/usr/bin` will fail (twice) with the following message:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active
developer directory '/Library/Developer/CommandLineTools' is a command
line tools instance
Closes#198.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Due to a typo, the range of LLVM build versions 2066 to 2325 were never
matched and thus Xcode 3.2.0 could never be inferred from that. (Only
relevant for legacy systems. Doesn't seem to have impacted any users.)
`brew deps` has three different modes of operation that were not easy to
infer from the existing documentation. Split the help text into three
parts to make this clearer. This also improves on the confusion when
options were silently ignored because they don't apply to a certain mode
of operation. Those are:
1. List the shared dependencies (either intersection or union) of
explicitly named formulae with options for traversal depth/order.
2. Output separate trees of explicitly listed or all installed formulae.
3. List all available/installed formulae and their direct dependencies
with one line per formula formatted as `<formula>: <dependencies>`.
Closes#137.
Closes#179.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
- 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).
Do the bottle check using any platform's bottle, so `brew pull` works
on bottled formulae which don't include a bottle for the current system.
Make output more concise and informative
* Remove expected download error messages when waiting for Bintray publishing
* Replace patch download progress bars with patch file name
* Silence git output about switching to and from bottle-pulling branch
* Include formula name and patch type in some progress messages
Replace `homebrew` with `brew`, `homebrew-core`, or `legacy-homebrew`
depending on context.
Closes#175.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
The exit status of pbpaste is a proxy for whether the user has set up
reattach-to-user-namespace. It should be 0 if it is set up, 1 otherwise.
This is the same hack as Homebrew/homebrew-services#48.
This way analytics related settings and parameters (currently
analyticsdisabled, analyticsmessage and analyticsuuid) are all kept in
the same place.
Note that in this commit we offer a path of migration: if
~/.homebrew_analytics_user_uuid already exists, read the UUID from it,
write to homebrew.analyticsuuid, and remove it.
See more detailed discussions in #145.
Closes#162.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>