4116 Commits

Author SHA1 Message Date
Bob Lail
a26390be05 Fix bug with printing pinned dependencies.
Brew prints this error:
```
Error: undefined method `join' for nil:NilClass
```

because, in this code:

```ruby
puts pinned_dependents.map do |f|
  "#{f.full_specified_name} #{f.pkg_version}"
end.join(", ")
```
the block is passed to `puts` and not to `map`. `.join(",")` is called on the output of `puts`.

(I think the regression was introduced in this commit: e12a7b0808353ea81d63774be1edaff81710d7a6)
2019-12-04 12:31:01 -06:00
EricFromCanada
9bfd597991 Format debug messages with odebug 2019-12-02 11:33:19 -05:00
EricFromCanada
fcdda8d481 commands: add formatting to headings 2019-12-02 11:32:33 -05:00
hyuraku
e6e0d1128c create new envoronments 2019-12-03 00:45:11 +09:00
Mike McQuaid
766fc4b301
Fix RuboCop 0.77.0 failures. 2019-11-28 15:10:50 +00:00
Mike McQuaid
e8b74601cb
uses: make naming and behaviour consistent with deps and docs. 2019-11-27 12:49:46 +00:00
Mike McQuaid
5cca9b75a8
deps: use runtime_dependencies more readily.
If all the passed packages are currently installed then use
`runtime_dependencies` to get dependency data more quickly and
accurately.

As discussed in https://github.com/Homebrew/brew/issues/6769.
2019-11-27 12:36:21 +00:00
Mike McQuaid
3a9f585ebb
Move more code to utils/analytics. 2019-11-22 09:10:29 +00:00
Issy Long
727f9671c7
info: show Linux formulae details and analytics
- This makes use of the new /api/formula-linux and /api/analytics-linux
  endpoints in formulae.brew.sh to give Linux users up to date formula and
  analytics info for their installed core formulae.

Before, on Linux, the macOS stats for the `ack` formula:

```
$ brew info ack
[...]
==> Analytics
install: 12,422 (30 days), 32,742 (90 days), 97,788 (365 days)
install_on_request: 10,778 (30 days), 28,339 (90 days), 85,202 (365 days)
build_error: 0 (30 days)
```

Now, on Linux, the Linux stats for the `ack` formula:

```
$ brew info ack
[...]
==> Analytics
install: 95 (30 days), 242 (90 days), 737 (365 days)
install_on_request: 94 (30 days), 241 (90 days), 734 (365 days)
build_error: 0 (30 days)
```
2019-11-22 09:10:29 +00:00
EricFromCanada
0242084929 shell commands: colourize messages 2019-11-21 16:18:46 -05:00
EricFromCanada
7ae87373ed info: raise on invalid category for formula analytics 2019-11-21 11:45:50 -05:00
EricFromCanada
4cd2775d4f info: use hyphenated category names for formula analytics 2019-11-20 20:47:05 -05:00
David Rupp
71fd680d51
Fix that reason is coerced to a boolean
f762033a57 introduced a bug such that `reason` is coerced to a boolean, so when displayed it loses information about the actual return value from `MissingFormula.reason`. This patch re-scopes the assignment of `reason` such that the actual reason is retained, while also retaining the sense of the new boolean check.
2019-11-20 09:49:08 -05:00
Issy Long
02524ba322
Remove --local from git config commands as it's the default
- The `--local` option doesn't exist in early versions of git (~1.7),
  but its behaviour is the default (saving in the current repo's .git
  directory).
- As it's the default across versions, we don't need to specify it
  everywhere.
- Reported in Linuxbrew/install issue 78.
2019-11-16 10:19:42 +00:00
Mike McQuaid
de6dc05f84
Merge pull request #6714 from hyuraku/repair_info_analysis
work correctly info analysis args
2019-11-14 14:44:45 -08:00
hyuraku
1ab86acb0f move methods to analytics_table function 2019-11-15 01:25:54 +09:00
Mike McQuaid
d6d857c154
cmd/upgrade: fix exit logic.
Fixes #6739
2019-11-14 07:22:19 -08:00
Mike McQuaid
9d539d6b3b
Merge pull request #6704 from MikeMcQuaid/deprecation-disable-remove
Handle 2.2.0 deprecations/disableds
2019-11-13 17:26:30 -08:00
Mike McQuaid
460da9f80d
Merge pull request #6728 from MikeMcQuaid/upgrade-indempotent
upgrade: don't error if already installed.
2019-11-13 16:18:00 +00:00
hyuraku
af59951c0e fix style 2019-11-13 23:00:32 +09:00
hyuraku
1afd271a13 check whether args is valid
whether args days is in valid_days and args category is in valid_categories
2019-11-13 22:51:57 +09:00
Mike McQuaid
5904aab98a
Merge pull request #6622 from zachauten/argv_kegs
Moved kegs from ARGV to args.rb
2019-11-13 00:22:09 +00:00
Mike McQuaid
9d2cb8e9b3
upgrade: don't error if already installed.
I've been convinced idempotency is a good thing for this command so this
would be a good thing to get out for 2.2.0.
2019-11-12 16:18:54 -08:00
Mike McQuaid
e8c241f56c
upgrade: fix handling broken dependents.
Ensure that we use the keg for checking linkage but that the dependents
returned are still formulae.

Fixes #6715.
2019-11-11 10:08:08 +00:00
Zach Auten
fd429d0d75 Moved kegs from ARGV to args.rb 2019-11-09 11:56:47 -05:00
hyuraku
8244a869f6 add empty line after guard clause 2019-11-09 13:11:55 +09:00
hyuraku
ff94e64ee6 info --analytics handle days and category args 2019-11-09 13:08:28 +09:00
Paul
2e55eac802
'upradable' typo for 'upgradeable_dependents' 2019-11-07 22:58:02 +07:00
Mike McQuaid
176297d361
Handle 2.2.0 deprecations/disableds
- Make all `odeprecated` from 2.1.0 `odisabled` instead
- Remove dead code that won't be run now
- Remove (unused) `or_later` handling for bottles
2019-11-06 15:25:40 +00:00
Mike McQuaid
102837e72c
Merge pull request #6701 from MikeMcQuaid/upgrade-tweak-dependent-messaging
upgrade: tweak dependent messaging.
2019-11-06 12:01:42 +00:00
Mike McQuaid
81e6359aeb
upgrade: tweak dependent messaging.
Output more without requiring `--verbose` and update the messages to
make clear what we're looking for and what we found/didn't find.

This is a little more noisy but it should help explain any delays to
users and make it more obvious what's failed if something does.
2019-11-06 11:38:17 +00:00
Mike McQuaid
1224f56511
deps: refactor weird OpenStruct usage. 2019-11-06 11:10:22 +00:00
Mike McQuaid
e12a7b0808
upgrade: simply check_dependents, remove recursion. 2019-11-06 10:21:31 +00:00
Mike McQuaid
b6116c5a03
deps: use Formulary factory cache. 2019-11-06 10:21:28 +00:00
Mike McQuaid
f24356f015
uses: refactor to improve performance 2019-11-06 10:20:57 +00:00
Mike McQuaid
0cf6052fcc
cmd/upgrade: comment-out broken_dependents functionality.
This is not a fix for https://github.com/Homebrew/brew/issues/6671 but
will stop people hitting this bug for now.
2019-11-05 09:51:17 +00:00
Chih-Pin Tan
7741672ecd Changes to be committed:
modified:   Library/Homebrew/cmd/shellenv.sh

Prevent overriding default MANPATH while MANPATH is empty.
2019-10-31 12:25:58 +00:00
R Primus
5ffc7e9d66
Change spelling of [Ss]ummarize to British english 2019-10-30 18:52:02 +00:00
Shaun Jackman
023f0b59a2 vendor-install: Change double hyphen to single 2019-10-22 11:26:16 -07:00
Shaun Jackman
6169244b15 vendor-install: Update aarch64 and add armv6 2019-10-19 11:16:42 -07:00
Markus Reiter
59866d25ea Fix shellenv when using -u. 2019-10-17 20:14:01 +02:00
Mike McQuaid
48f54d17f8
Merge pull request #6595 from sjackman/portable-ruby-aarch64
vendor-install: Add ruby bottle for aarch64
2019-10-16 14:16:57 +01:00
Markus Reiter
f762033a57 Move condition to nested if statement. 2019-10-14 11:28:30 +02:00
Issy Long
d0c3885f31
Merge pull request #6592 from issyl0/bump-rubocop-target-ruby-version
Bump Rubocop's `TargetRubyVersion` to 2.6 and fix all offenses
2019-10-14 09:39:21 +01:00
Mike McQuaid
f1702e5139
Merge pull request #6591 from amyspark/fix-depth-upgrade-check
upgrade: reject formulae checked in earlier levels
2019-10-14 08:44:10 +01:00
Shaun Jackman
c71b540ea6 vendor-install: Add ruby bottle for aarch64 2019-10-13 14:24:08 -07:00
Issy Long
341ea60807
Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00
L. E. Segovia
024007f9e2
upgrade: address @MikeMcQuaid's comments 2019-10-12 22:06:08 +00:00
L. E. Segovia
f4707a8041
upgrade: reject formulae checked in earlier levels 2019-10-12 15:53:21 +00:00
Thomas Plaçais
e616a23a0b
Remove uneeded warning message when searching for a cask that was migrated from a formula 2019-10-11 22:44:52 +01:00