125 Commits

Author SHA1 Message Date
Markus Reiter
175ca909ee Clean up code style and remove .rubocop_todo.yml. 2017-10-08 16:10:37 +02:00
Mike McQuaid
01e9ec9a9f Rubocop: automatic rule fixes. 2017-09-24 21:23:59 +01:00
Mike McQuaid
fe35bb32e8 tab: include aliases.
Including aliases in the tab allows e.g. `brew switch` to correctly
handle switching between different keg’s aliases.
2017-07-21 17:20:54 +01:00
Markus Reiter
2d6ae61314 Re-revert "Fix operator spacing." 2017-06-02 19:22:05 +02:00
Mike McQuaid
879b3360d3 Handle missing receipt on brew install.
For example if this is for a really old keg, keg where a user has
manually removed stuff or used `brew diy`.
2017-04-02 17:02:56 +01:00
Mike McQuaid
b99fb56275 tab: store installed_{as_dependency,on_request}.
These are used to determine whether or not a formula’s install was
specifically requested by a user and/or pulled in as a dependency.
2017-01-18 11:23:21 +00:00
Alyssa Ross
56d6695bf3 tab: set homebrew_version in Tab.empty 2017-01-04 00:56:06 +00:00
Alyssa Ross
d998a3fcce tab: remove #reliable_runtime_dependencies?
See https://github.com/Homebrew/brew/pull/1750#discussion_r94243825 for
discussion.

Removes Tab#reliable_runtime_dependencies? in favour of returning nil
from Tab#runtime_dependencies if the list is unreliable.

Because Homebrew 1.1.6 hasn't been tagged yet, tabs created in tests
aren't created with a homebrew_version that marks the
runtime_dependencies in the Tab as reliable, so there are some tests
that fail. To work around this, I've had to add a line to some tests
that explicitly overrides the homebrew_version in the Tab. This is
really ugly though, so they should be removed as soon as possible after
1.1.6 is released.
2016-12-30 20:34:14 +00:00
Alyssa Ross
c41d1d8148 tab: remove #homebrew_tag
This method isn't used any more
2016-12-30 18:16:49 +00:00
Alyssa Ross
ce454bd141 tab: parse full Homebrew version string
It didn't occur to me that this would work, but it does! Magic.
2016-12-30 18:15:35 +00:00
Alyssa Ross
bdbc19c614 tab: implement #reliable_runtime_dependencies? 2016-12-30 16:16:28 +00:00
Mike McQuaid
f98304026b Deprecate 32-bit options.
These were formerly supported but as it has been a very long time since
32-bit software was necessary on macOS these have been deprecated with
a `brew audit` warning and a future `odeprecated`.
2016-12-20 10:22:30 +00:00
Alyssa Ross
5cf97e5603 tab: remove debugging 2016-12-03 23:26:52 +00:00
Alyssa Ross
7544a9afc7 tab: include HOMEBREW_VERSION 2016-12-03 19:46:38 +00:00
William Woodruff
d07b9ed7f2
Replace Utils::JSON with corelib JSON calls. 2016-11-20 20:06:25 -05:00
Alyssa Ross
3555206a7f formula: make cache clearing methods, *ahem*, clearer 2016-11-17 14:36:49 +00:00
Alyssa Ross
8bfc205a87 tab: clear Formula.installed cache when created.
This was causing the flaky tests that #1508 started skipping.

This is the second time that `Formula.installed`'s cache has bitten
me with intermittent test failures, and I'd like it to be the last,
so I've made it so the cache is cleared automatically when a tab is
created. This _should_ mean that the cache is cleared any time it
needs to be, with the exception of when a Keg is created artificially
with no tab. I don't think there's anything I can do to automatically
handle that use-case, though.
2016-11-17 14:26:00 +00:00
Josh Hagins
9c519bbdbc keg_relocate: refactor relocate_text_files
Replace relocate_text_files with three methods that clarify intent:
replace_locations_with_placeholders, replace_placeholders_with_locations
and replace_text_in_files, the first two calling the third.
2016-10-24 16:21:08 -04:00
Josh Hagins
c46155aba4 keg_relocate: cache files rewritten during brew bottle
`brew bottle` replaces instances of the Homebrew prefix, cellar, and
repository with placeholders in all text files. Cache these files in
INSTALL_RECEIPT.json so that we don't have to check every single text
file for placeholders on install.
2016-10-24 16:21:08 -04:00
Alyssa Ross
cd615acd5f tab: don't interpret unknown deps as no deps 2016-10-11 09:00:39 +01:00
Markus Reiter
fe2d51e0b9 Fix Style/IfUnlessModifier. 2016-09-23 15:30:07 +02:00
Alyssa Ross
41e25209f7 Save runtime dependencies in INSTALL_RECEIPT.json
Fixes #930
2016-09-19 20:53:39 +01:00
Mike McQuaid
6693915399 rubocop --auto-correct all remaining files.
But remove some manual `.freeze`s on constants that shouldn't be
constants.
2016-09-17 16:14:13 +01:00
Mike McQuaid
1d66cdd3ad Merge pull request #863 from penman/preserve_alias
Save aliases in INSTALL_RECEIPT
2016-09-09 07:47:05 +01:00
Alyssa Ross
8c3a11bca8 Explain more Tab instantiation methods 2016-09-07 23:17:25 +01:00
Alyssa Ross
d62029f899 Explain Tab.create vs Tab.for_formula
This was really confusing to me, and I had to go looking through the Tab
history, where I found a comment explaining it that has since been
deleted. This wasn't a great experience.

This commit basically adds that explanation back in.
2016-09-07 23:04:49 +01:00
Alyssa Ross
f9e16ee2e0 Combine Tab alias_path with source.path 2016-09-07 22:48:52 +01:00
Alyssa Ross
ba10ce70bd More consistent style 2016-09-05 22:01:05 +01:00
Alyssa Ross
b90eba8ffd Update Tap for alias_path 2016-09-05 14:26:17 +01:00
Alyssa Ross
65ee5408c3 Replace install_name/install_ref with alias_path 2016-09-05 01:19:08 +01:00
Alyssa Ross
0ef3e1e0dc Preserve alias when installing formulae
Part of #567
2016-09-03 21:16:43 +01:00
Vlad Shablinsky
f085597cbd Use epochs in tabs 2016-08-18 10:38:10 +02:00
Uladzislau Shablinski
b40b072ed8 tab: fix Tab.for_formula versions (#687)
versions should be initialized even if formula is not installed
2016-08-13 21:26:21 +08:00
Vlad Shablinsky
42bc623a27
tab: allow to store versions 2016-08-06 21:25:56 +08:00
Mike McQuaid
164e46a729 Add missing development_tools requires. 2016-07-29 21:21:02 -06:00
Mike McQuaid
c90552f66b tab: use the correct default compiler. 2016-07-29 21:21:02 -06:00
Xu Cheng
f49233c89b
Tab#for_formula: using Formula#installed_prefix
Closes #529.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-07-17 02:23:37 +08:00
Xu Cheng
30bbb93f21
tab: add missing methods
This makes `Tab` compatible with `BuildOptions`.
2016-07-15 19:57:23 +08:00
Martin Afanasjew
bf40dd64df tab: eliminate redundant 'Tab.create' arguments (#468)
The `build` and `source_modified_time` arguments are always coming from
the matching attributes of the `Formula` instance. Thus query `formula`
for them instead of passing them individually.
2016-07-08 01:14:34 +02:00
Martin Afanasjew
77dd9d56ff Use GitRepositoryExtension for HOMEBREW_REPOSITORY 2016-07-07 01:46:58 +02:00
Martin Afanasjew
86fa42b36c tab: fix bad default_compiler reference
Partially addresses #219. Related to changes introduced in #168.
2016-05-08 20:12:51 +02:00
Zhiming Wang
1fa48234e5 tab: include installation date in string representation
This way brew info will include the installation date for each installed
version.

Closes #196.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-05-05 23:53:36 +02:00
Xu Cheng
a5cfc011e0 various: Homebrew/core is the core tap
Also make `Homebrew/homebrew` as an alias of this tap to keep
backward compatibility.
2016-04-02 21:51:36 +08:00
Xu Cheng
fab16b83e9 tab: add source modified time metadata 2016-01-15 16:26:04 +08:00
Mike McQuaid
e5ba31fcdc Allow multiple option_names in dep/reqs.
This means that dependencies can be merged but still maintain all
their option names.

Closes Homebrew/homebrew#46916.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-15 08:37:16 +00:00
Xu Cheng
72f4323ea5 Tab#tap: returns tap object 2015-12-09 16:56:59 +08:00
Xu Cheng
f442510787 tab: use installed_prefixes 2015-11-29 20:24:30 +08:00
Mike McQuaid
10c79620c1 tab: use cache to avoid rereading the same files.
Closes Homebrew/homebrew#46400.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-11-27 16:52:54 +00:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Xu Cheng
b7732e80b4 tab: check mxcl/master synonym unconditionally 2015-08-02 16:34:45 +08:00