1. Running `brew linkage some_package` does not set the cache.
2. Running `brew linkage --cached some_package` when `DatabaseCache.empty?` returns `true` should build the cache.
3. Running `brew linkage --cached some_package` when `DatabaseCache.empty?` returns `false` should use the cache.
Ensure that a non-zero exit code is set both for missing random dylibs
and random missing dependencies.
Additionally, while we are here, drastically trim down the public
interface for this class to the bare minimum and allow getting the
output from `display_test_output` as a variable.
Fixes issue mentioned by @ilovezfs in:
https://github.com/Homebrew/brew/pull/3940#issuecomment-383794520
* take requirements into account.
* handle full qualified formula name.
* filter out build time or unused optional deps/requirements.
Closes#424.
Signed-off-by: Xu Cheng <xucheng@me.com>
Move check for emptiness into the display method, avoiding repetitive
checks on the call site.
Closes#381.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Prevent raising an error when `HOMEBREW_RUBY_MACHO=1` is set. Skipping
symlinks and directories while iterating over a directory structure to
find Mach-O binaries makes sense and similar logic is applied elsewhere.
Pulls 'brew linkage' in to main brew repo as a dev-cmd, and has test-bot
use it to detect dylib breakage, which usually means a revision bump is
needed. Checks all dependents, not just those with a 'test do' block
defined, since we can do this without formula support.
Closes#107.
Signed-off-by: Andrew Janke <andrew@apjanke.net>