1155 Commits

Author SHA1 Message Date
Mike McQuaid
0a76c9f02e mktemp: move to Formula and compat.
Move this method away from FileUtils as it doesn't need to be on that
class.
2018-07-13 14:42:49 +01:00
Markus Reiter
7762ce32aa Use more descriptive heredoc names. 2018-07-11 18:15:30 +02:00
Mike McQuaid
f5fbb74aaf linkage: fix output of optional dependencies.
Check the runtime dependencies from the tab when outputting the
`brew linkage` declared vs. undeclared dependencies.
2018-07-05 20:29:19 +01:00
Mike McQuaid
42e5ef9f89 tab: set runtime_dependencies consistently. 2018-06-01 19:53:26 +01:00
Mike McQuaid
6b817f775f Formula: handle bad tap runtime dependencies.
Also add some better exceptions for the cases that `nil`s end up
getting passed around incorrectly.
2018-06-01 19:22:33 +01:00
Mike McQuaid
a674a972a5
Merge pull request #4258 from MikeMcQuaid/update_head_version_path
Formula#update_head_version: fix PATH.
2018-06-01 16:59:39 +01:00
Mike McQuaid
f24c77f3dd Formula#update_head_version: fix PATH.
Ensure that all the necessary tools are accessible.
2018-06-01 16:43:11 +01:00
Mike McQuaid
31112934b0
Merge pull request #4257 from MikeMcQuaid/required-recommended
runtime_dependencies: include recommended deps.
2018-06-01 16:38:55 +01:00
Mike McQuaid
61617a257e linkage_checker: use default use_cache parameter for callers. 2018-06-01 14:05:16 +01:00
Mike McQuaid
b66aafc218 runtime_dependencies: include recommended deps.
These previously weren't being generated correctly for dependencies of
formulae that weren't installed.
2018-06-01 14:01:34 +01:00
Mike McQuaid
97645d061d
Merge pull request #3720 from AndrewMcBurney/cache-optimization
Cache optimization for `brew linkage` command.
2018-05-24 09:14:02 +01:00
Andrew R. McBurney
ddb7f06e9f Fixed rubocop offenses from brew style. 2018-05-22 12:54:54 -04:00
Mike McQuaid
44f5d3ec79 Refactor cache store code. 2018-05-22 14:46:14 +01:00
Andrew R. McBurney
010207b982 Changed cache usage behavior.
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.
2018-05-21 17:36:30 -04:00
Andrew R. McBurney
e93e8f3266 Lazily load db of type DBM instance variable for DatabaseCache so the corresponding database file isn't created in the .use block for a DatabaseCache. 2018-05-18 16:37:01 -04:00
Andrew R. McBurney
ddd2ec05d8 Added static use method for DatabaseCache. 2018-05-17 16:56:59 -04:00
Andrew R. McBurney
17f484b0ae Set the return_value from the initialize block in the DatabaseCache. 2018-05-15 13:15:30 -04:00
Mike McQuaid
11c7b08a34 formula: add versioned_formulae to to_hash. 2018-05-12 15:02:29 -04:00
Mike McQuaid
840c97c1cc formula: add versioned formulae method. 2018-05-12 15:02:29 -04:00
Mike McQuaid
524379e897 formula: improve dependencies hash output.
It doesn't really make any sense for the `dependencies` hash to include
all optional, recommended and build dependencies when these are already
separately output.
2018-05-12 14:28:08 -04:00
Mike McQuaid
0797a3e19e formula: reorder to_hash.
Let's reorder this to more closely match the ordering in a formula file.
This makes `to_hash` (and our JSON output) more useful and easily
readable for people used to formula files.
2018-05-12 14:28:08 -04:00
Andrew R. McBurney
d3120c0206 Use cache if HOMEBREW_LINKAGE_CACHE exists in formula_cellar_checks and formula. Make functions private in LinkageChecker. 2018-05-06 15:55:33 -04:00
Mike McQuaid
555e2a2fc8 Merge remote-tracking branch 'origin/master' into cache-optimization 2018-05-02 09:46:58 +01:00
Mike McQuaid
191724ce83 formula: read runtime dependencies from more tabs.
The fixes the issue mentioned in:
https://github.com/Homebrew/brew/pull/4066#issuecomment-381308153
where `brew missing` was not reading from a tab of an outdated formula.

The `installed_prefix.directory?` check is unnecessary as the following
`opt_or_installed_prefix_keg` call is already checking that when it is
necessary. In this case it's not necessary anyway as `opt_prefix` is
preferred and makes more sense on outdated formulae.
2018-04-28 15:29:19 +01:00
AndrewMcBurney
461d7d72de Fixed failing tests in formula.rb caused by merge. 2018-04-25 10:25:00 -04:00
Mike McQuaid
3454d6a961 runtime_deps: improve documentation and consistency. 2018-04-25 11:44:29 +01:00
Mike McQuaid
598bbd4c72
Merge branch 'master' into undeclared_runtime_dependencies 2018-04-25 10:41:43 +01:00
Mike McQuaid
63c0706190 formula: sort aliases in to_hash.
Otherwise the ordering varies based on the filesystem.
2018-04-18 11:17:57 +01:00
Mike McQuaid
a34c11874b formula: tweak to_hash bottle output.
Make some changes required to have `brew info --json=v1` whether there
is any bottle block rather than a bottle checksum for the given system.

This provides more consistent output.
2018-04-17 21:44:50 +01:00
Mike McQuaid
d08a4accfb
Merge pull request #4083 from MikeMcQuaid/remove-xcode-installed-guards
Remove Xcode.installed? guards.
2018-04-17 11:16:43 +01:00
Mike McQuaid
85edbd28b1 Remove Xcode.installed? guards.
It's safe since 600d58f4ca3d85894c66a38802965fd94d4ea469 when
MacOS::Xcode.version started returning `Version::NULL` where
appropriate.
2018-04-17 10:58:51 +01:00
Mike McQuaid
0a00312b71 Autocorrect new RuboCop 0.55.0 style violations. 2018-04-17 10:54:58 +01:00
Mike McQuaid
cffa5a9864 Disable/delete/add more deprecations
Move various `odeprecated` to `odisabled` and delete uses of
`odisabled`.
2018-04-08 14:57:17 -07:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Alyssa Ross
264acb22f4
Restore Formula#declared_runtime_dependencies
This got lost in a merge.
2018-04-07 12:16:10 +01:00
Alyssa Ross
6bbc56c3a9
Merge branch 'master' into undeclared_runtime_dependencies 2018-03-30 12:39:13 +01:00
Markus Reiter
94f2098c36 Only use HOMEBREW_TAP_PATH_REGEX once inside Tap class. 2018-03-29 22:05:02 +02:00
Mike McQuaid
42a39b16bf formula: use runtime_dependencies from tab.
Don't do so in `linkage_checker` or `tab` which to avoid recursive loops
and want the actual values specified in the formula itself.
2018-03-27 14:52:47 +01:00
Mike McQuaid
6fec707059 Formula#missing_dependencies: use runtime_dependencies. 2018-03-27 14:52:47 +01:00
Mike McQuaid
0a73b0b423 formula: require tab. 2018-03-27 14:52:47 +01:00
Mike McQuaid
eb31392b48 Formula#to_hash: cleanup method.
Use some newer Ruby functionality and avoid calling `deps` multiple
times when not necessary.

Additionally, remove the unneeded `rubocop:disable`.
2018-03-21 12:38:47 +00:00
Alyssa Ross
6cd195723f
Merge branch 'master' into undeclared_runtime_dependencies 2018-03-12 09:22:39 +00:00
Alyssa Ross
0a2f0ab456
Fix formula/linkage_checker infinite recursion 2018-03-12 09:20:24 +00:00
Mike McQuaid
70253f0009 Adjust docs and more internal code for Python 3.
Now we have `python` for Python 3 and `python@2` for Python 2 some more
adjustments need to be made.
2018-03-03 09:42:25 +00:00
Alyssa Ross
af682d2d63
Merge branch 'master' into undeclared_runtime_dependencies 2018-03-01 17:39:49 +00:00
Alyssa Ross
51b27039be
Revert "Only check undeclared dependencies on macOS"
This reverts commit fa5245f7adf38833b03e92e42aa5217ac5157773.
2018-03-01 17:30:42 +00:00
Alyssa Ross
fa5245f7ad
Only check undeclared dependencies on macOS
We don't currently have a LinkageChecker on Linux, so can't do this.
2018-03-01 17:30:37 +00:00
Mike McQuaid
f2ce6489b2 Use more docs.brew.sh short links
These are nicer on the eyes.
2018-02-22 19:46:58 +00:00
Alyssa Ross
10ec789660
Don't include declared dependencies in undeclared
oops
2018-02-11 16:30:58 +00:00
Alyssa Ross
40ca03e975
Add undeclared dependencies to Tab when installing
An installed formula doesn't get optlinked until _after_ it's installed,
meaning that we can't rely on `opt_prefix` to get the right keg.

So, if not optlinked, fall back to the formula's prefix, which will be
that of the current installation.
2018-02-11 16:23:22 +00:00