1170 Commits

Author SHA1 Message Date
Jonathan Chang
ce45868973 Improve documentation and add type signatures. 2021-01-11 10:40:59 +11:00
Seeker
b9854bd4cf rubocops: add unless_multiple_conditions 2021-01-08 10:33:54 -08:00
Michka Popoff
5e91802470 checksum: simplify, use only sha256
We use only one sha type right now.

Needed for https://github.com/Homebrew/brew/pull/10186
2021-01-07 20:46:13 +01:00
Seeker
509b977b50 formula: return "*.dylib" for shared_library("*") on macOS 2020-12-24 08:53:32 -08:00
Rylan Polster
5f10a8ea76 formula: add disable/deprecation dates and reasons to json output 2020-12-23 09:56:46 -05:00
Rylan Polster
2eb34b0b27 formula: add deprecation_date and disable_date methods 2020-12-23 02:58:14 -05:00
Mike McQuaid
2c4aea93cd
Merge pull request #10062 from SeekingMeaning/postinstall-env
formula: activate env extensions for postinstall
2020-12-22 08:24:25 +00:00
Michka Popoff
986f65b973 formula: add std_configure_args
Most commonly used configure args
libdir is set to lib to enforce the usage of the single lib folder
on linux, instead of installing to lib64 on some systems.
2020-12-19 22:27:29 +01:00
Seeker
19c118d002 formula: activate env extensions for postinstall 2020-12-18 12:35:06 -08:00
Mike McQuaid
74fb058c7e
More deprecations
More deprecations, disabling and removal for Homebrew 2.7.0.
2020-12-18 14:17:37 +00:00
Mike McQuaid
4dfcf74fb2
Merge pull request #9478 from MikeMcQuaid/deprecate-disable-date
formula: deprecate!/disable!: deprecate missing or non-ISO 8601 dates.
2020-12-18 12:15:51 +00:00
Mike McQuaid
87dd13aea6
Deprecate cask requirements.
This probably has to wait until 2.7.0 now and will require a bunch of
formula changes/deprecations but we should probably start moving in this
direction given we're not installing any of these on our CI any more.
2020-12-15 14:19:45 +00:00
Mike McQuaid
f87ce3fffb
formula: deprecate!/disable!: deprecate missing or non-ISO 8601 dates.
As requested in https://github.com/Homebrew/homebrew-core/issues/66360
2020-12-11 14:03:21 +00:00
Mike McQuaid
0f9bad0052
Fix bottle prefix and repository handling
We were previously only looking at the `cellar` value when pouring
bottles and ignoring the `prefix` and (implicit) `repository`.

Actually look at these values and set the defaults for each platform.

Also, when we're relocating to create or pour bottles when `prefix`
and `repository` are equal then skip relocating the `repository` and
always use references to the `prefix` instead.

Fixes #9453
2020-12-09 13:53:10 +00:00
Seeker
a2af19360b extend: add on_os (for on_macos/on_linux) 2020-12-07 10:36:51 -08:00
Mike McQuaid
9216d8abe6
rubocop-rails: make fixes. 2020-12-02 10:43:04 +00:00
Jonathan Chang
0d058666d8 formula: widen type for system args
We can pass Integers here too, for e.g. make flags

```
TypeError: Parameter 'args': Expected type T.any(Pathname, String), got type Integer with value 4
Caller: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/pypy.rb:68
Definition: /usr/local/Homebrew/Library/Homebrew/formula.rb:1985
```
2020-12-01 01:20:18 +01:00
Markus Reiter
7d9758a05e Fix RuboCop offenses. 2020-11-30 22:50:15 +01:00
danielnachun
7d8f6d9d22 explicitly specify CMake libdir as lib 2020-11-27 17:56:03 +11:00
Markus Reiter
1690f064a2 Add types for Formula. 2020-11-25 17:36:52 +01:00
Mike McQuaid
d496f5c121
Deprecations for Homebrew 2.6.0
Do the usual deprecate/disable dance for the Homebrew 2.6.0 release.

Not to be merged until the next release will definitely be 2.6.0.
2020-11-24 16:44:02 +00:00
Markus Reiter
0184e271d8 Fix RuboCop offenses. 2020-11-17 11:09:55 +01:00
Markus Reiter
1b732ec7b2 Fix RuboCop offenses. 2020-11-16 02:05:29 +01:00
Rylan Polster
50890ebd51 fix Lint/DuplicateBranch style 2020-11-16 02:02:52 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Mike McQuaid
2ac5cffd0d
Merge pull request #9047 from tie624/add_autoremove
Add autoremove
2020-11-06 16:47:59 +00:00
Mike McQuaid
746e7000e3
Improve --force-bottle behaviour.
- set `Formula#force_bottle` from `FormulaInstaller`
- refuse to install non-bottled formulae with `--force-bottle`
- raise exceptions on fetch/pour failures if `--force-bottle is passed.

While we're here:
- use `CannotInstallFormulaError` for some `RuntimeError`/`odie`

Fixes https://github.com/Homebrew/brew/issues/8866.
2020-11-06 11:25:31 +00:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
EricFromCanada
dddfbf80fc apidoc: add/update yard tags 2020-11-06 00:16:35 -05:00
EricFromCanada
4f7719ac2e apidoc: update examples' syntax 2020-11-05 23:50:55 -05:00
EricFromCanada
d293431b87 apidoc: update URLs 2020-11-05 23:50:55 -05:00
Tie
afd7bb8889 make suggestions 2020-11-05 12:27:22 -05:00
Tie
b5427e5095 fix style issues 2020-11-04 18:53:03 -05:00
Tie
f95e1729a2 move logic from leaves to formula 2020-11-04 16:45:14 -05:00
Michka Popoff
084f2e75eb
Merge pull request #8907 from iMichka/onlinux
formula: add on_linux and on_macos blocks
2020-11-03 23:30:37 +01:00
Michka Popoff
8b85ef2e88 formula: add on_linux and on_macos blocks
for install and others
2020-11-03 22:54:07 +01:00
Mike McQuaid
488a43ecd7
Merge pull request #9027 from Homebrew/revert-9016-revert-9009-improve-versioned-linking
Improve @-versioned formulae linking.
2020-11-02 14:33:32 +00:00
Mike McQuaid
dcba99c7d1
Revert "Revert "Improve @-versioned formulae linking."" 2020-11-02 11:20:09 +00:00
EricFromCanada
f4aeb3e956 arch_requirement: update and add to JSON representation of formulae 2020-11-01 11:57:00 -05:00
Shaun Jackman
099af8cf9c
Revert "Improve @-versioned formulae linking." 2020-10-30 10:40:10 -07:00
Mike McQuaid
849034c368
Improve @-versioned formulae linking.
The way we currently handle @-versioned formulae linking is pretty
labourius:
- it requires extensive use of `link_overwrite` to avoid the `link`
  stage failing on certain install/upgrade scenarios
- we teach people to use `brew link --force` whenever they wish to
  link a versioned formulae when it's pretty obvious what's expected
  in that situation

Instead, let's:
- automatically unlink other versioned formulae when linking a
  versioned formula (either through `brew link` or `install`/`upgrade`
  /`reinstall`)
- notify the user what we've done (with the same messaging as if
  they had run `brew link` manually)
2020-10-29 13:35:03 +00:00
Mike McQuaid
ffe827ad0e
Fix upgrading dependents on missing keg
Ensure that we don't try to check for broken linkage in a keg that
doesn't exist. Furthermore, fix the reason we checked for the keg that
doesn't exist by `Formula.clear_cache`.

While here, I noticed that there was other methods of caching at use in
`Formula` so consolidate them to be consistent.

Fixes #8997
2020-10-29 08:31:04 +00:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
nandahkrishna
20dde0b313
Add head_only? to Formula, replace head? in livecheck 2020-10-04 01:03:20 +05:30
Markus Reiter
05a84c5a3f Explicitly specify block argument for each methods. 2020-09-19 02:03:56 +02:00
Mike McQuaid
e93a6aa51b
Merge pull request #8700 from MikeMcQuaid/formula-spdx-require
formula: add missing SPDX require.
2020-09-11 17:40:01 +01:00
Mike McQuaid
cea6bf6efe
formula: add missing SPDX require.
https://github.com/Homebrew/formulae.brew.sh/pull/328/checks?check_run_id=1102740199#step:6:5
2020-09-11 17:16:03 +01:00
Mike McQuaid
5d82f67427 formula: use pretty license output in JSON.
This will improve things for formulae.brew.sh.
2020-09-11 13:10:42 +01:00
Tom Schoonjans
6af2b6db31 std_meson_args: add --wrap-mode=nofallback
Otherwise projects may download missing dependencies and build and
install them. GNOME projects do this a lot in particular.
2020-09-08 14:58:24 +01:00
Markus Reiter
8fb769e60c Ignore FormulaUnreadableError in Formula.each. 2020-09-03 19:48:18 +02:00