3122 Commits

Author SHA1 Message Date
Mike McQuaid
d90398692c Merge pull request #2475 from MikeMcQuaid/uses-deleted
uses: allow checking deleted formulae.
2017-04-17 15:49:43 +01:00
Mike McQuaid
5a2c91dbc2 uses: allow checking deleted formulae.
This is useful for seeing when formulae are deleted if they are going to
leave behind any formulae that depend on them.

As a result, if there are any formulae returned return a non-zero/failed
exit status.
2017-04-17 15:06:48 +01:00
Mike McQuaid
3b14aa2e90 install: use include instead of regex. 2017-04-17 14:56:04 +01:00
Zhiming Wang
363b26801a
install: do not search taps when a qualified formula is missing 2017-04-15 20:27:33 -04:00
John Hawkinson
b0d25d83fe info: rubocop 2017-04-09 17:14:09 -04:00
John Hawkinson
971e53c001 info: Print reason for conflicts where available 2017-04-09 15:23:53 -04:00
Mike McQuaid
39b8f106d2 update-report: don't show new, installed formulae.
These were those migrated from other taps but if they are installed
already: they aren't new to that user.
2017-04-04 15:15:42 +01: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
566d3cb58b Document all short flags. 2017-04-02 10:14:58 +01:00
Eugene Nikolsky
edd9a9717c Fix the 'export PATH' message in link for a keg-only formula
Commit 4cae6a724e6d684eb157dd6d7328755694f228b2 introduced the message,
but it printed the wrong path, e.g. for `brew link sqlite`:

```
If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/sqlite:$PATH"' >> ~/.zshrc/bin
```

where `/bin` is appended at the end, but should be inserted before
`:$PATH`: `echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.zshrc`.
This patch fixes that and updates a test to verify it.
2017-04-01 20:12:00 -07:00
Mike McQuaid
7d07d859ce migrator: check if taps are from same user instead
This avoids needing to use `force: true` and still let's Homebrew do
what we want with our own taps.
2017-03-31 10:28:45 +01:00
Mike McQuaid
90c6d5f40a upgrade: perform rename migrations when needed. 2017-03-31 10:01:46 +01:00
Mike McQuaid
61ebc128af reinstall: perform rename migrations when needed. 2017-03-31 10:01:46 +01:00
Mike McQuaid
d82522060e install: perform rename migrations when needed. 2017-03-31 10:01:46 +01:00
Mike McQuaid
ffd706d997 update-report: more forceful rename migration.
Migrate between different taps and delete relevant subdirectories if
they can be safely. Also, tweak some naming and use utility methods.
2017-03-31 10:01:45 +01:00
Mike McQuaid
80b39bb239 Merge pull request #2374 from joshka/cleanup-command-continue-on-error
Cleanup: Continue on error removing keg
2017-03-31 09:43:47 +01:00
Joshua McKinney
48fdd163bc Brew cleanup: Continue on error removing keg
Fixes #2355
Create unremovable_kegs instance var
Check cellar cleanup failure after full cleanup completes
Use module_function in Homebrew::Cleanup as we never instantiate the
class
2017-03-31 01:44:04 -05:00
William Roe
996dcdee2c Add pinned version to outdated json output
The structure should be consistent, so there are always pinned and
pinned_version fields even if there are no pinned versions for a given formula.
2017-03-27 11:41:08 +01:00
William Roe
70446d9112 Add pinned version to outdated output 2017-03-27 11:30:36 +01:00
Mike McQuaid
f8cf506670 Merge pull request #2372 from MikeMcQuaid/link-keg-only-path-message
link: tell users of `brew link --force` about opt.
2017-03-23 10:00:47 +00:00
Mike McQuaid
4cae6a724e link: tell users of brew link --force about opt.
If people are force-linking keg-only things they should probably be told
that they can add the opt prefix to their PATH instead.
2017-03-23 08:42:29 +00:00
Mike McQuaid
35a4836dc3 search: silence searching git log. 2017-03-23 08:39:29 +00:00
Mike McQuaid
c458ffbd24 install: immediately print FormulaUnavailableError. 2017-03-23 08:39:29 +00:00
Mike McQuaid
e55f3a0cc5 info: immediately print FormulaUnavailableError. 2017-03-23 08:39:29 +00:00
Mike McQuaid
b41a88eac4 update-report: check migration symlinks.
Check if `HOMEBREW_CELLAR/old_name` is a symlink. If so, it's already
been migrated so can be skipped.
2017-03-21 15:21:23 -07:00
Mike McQuaid
4117d198cc Merge pull request #1732 from zmwangx/hint-migrations
Hint at new location of migrated formulae
2017-03-21 17:31:31 +00:00
Mike McQuaid
ec0737d71f Merge pull request #2370 from MikeMcQuaid/update-migrate-all-formula
update-report: migrate all formulae every time.
2017-03-21 14:40:07 +01:00
Mike McQuaid
f59eb358c2 missing_formula: subsume historic logic.
These methods belong together so combine them in a single class to
provide a simpler API.
2017-03-20 20:37:12 +01:00
Mike McQuaid
80e95b684e blacklist: move to missing_formula class instead.
This will allow extending this class so it can be used by more than
just blacklisting.
2017-03-20 18:20:31 +02:00
Mike McQuaid
623c95b3f8 cmd/log: improve output messaging.
This wasn’t adapted to the new, multiple repository world.
2017-03-20 18:20:31 +02:00
Mike McQuaid
8cedd62750 search: tweak specific formula match formatting. 2017-03-20 18:20:31 +02:00
Zhiming Wang
1c10a6260f Hint at new location of migrated formulae
Partial implementation of
https://github.com/Homebrew/brew-evolution/pull/15, along with the ability to
search for deleted formulae in git history (inspired by #1996) which is not
described in the proposal.

See also: #1371.
2017-03-20 18:20:31 +02:00
Mike McQuaid
4af8bdf111 update-report: migrate all formulae every time.
Unmigrated formulae cause hard-to-debug issues and relying on detection
on Git alone is faster but not comprehensive. Instead, iterate through
renamed, installed formulae every time and migrate them.

Closes #1770.
2017-03-20 18:10:28 +02:00
Mike McQuaid
ae43415fb4 update-report: migrated formulae were not deleted.
The taps they were migrated to are auto-tapped if not already tapped
anyway so don't show them as deleted to avoid confusion.
2017-03-20 15:28:24 +02:00
ilovezfs
52d1d2cc3f upgrade: keg_only before non-keg_only formulae
Avoids unnecessary conflicts when a previously non-keg_only formula is
in the way by prioritizing keg_only before non-keg_only formulae.

This change is motivated by the upgrade of gnupg 2.0 to 2.1, since the
latter no longer depends on the gpg-agent formula, which, even if made
keg_only, still causes the link step to fail for 2.1, as gpg-agent's
non-keg version won't have been upgraded to the keg_only version at that
point (alphabetically gnupg precedes gpg-agent).
2017-03-17 12:39:43 -07:00
Markus Reiter
d1995dad4b Use a Formulary-like approach to load Casks. 2017-03-16 12:10:19 +01:00
Mike McQuaid
c67c338a06 Merge pull request #2322 from MikeMcQuaid/autoupdate-stop-skipping-no-formula-taps
update: stop autoupdate skipping no formula taps.
2017-03-12 20:22:29 +00:00
Mike McQuaid
282622e449 update: stop autoupdate skipping no formula taps.
This will be slightly slower if you have a bunch of non-formula (i.e.
command or cask) taps but it avoids the confusion of having Homebrew
saying it's updated when it only did so selectively.

Fixes #1946.
2017-03-12 09:13:27 +00:00
Markus Reiter
c594ffefbc Add Formatter::pluralize. 2017-03-11 21:12:51 +01:00
Mike McQuaid
fe59fde8f8 style: improve Rubocop error handling.
- Check if the JSON is definitely invalid (< 2 characters)
- Output the arguments that were passed to Rubocop
2017-03-08 09:26:07 +00:00
Mike McQuaid
3aa088dcaf Merge pull request #2272 from EricFromCanada/master
Add more flags and descriptions to man pages.
2017-03-06 18:00:39 +00:00
Markus Reiter
3e7f94d5b5 Move cask to cmd/. 2017-03-06 11:41:29 +01:00
EricFromCanada
aee23ccb03 Add more flags and descriptions to man pages. 2017-03-05 21:45:15 -05:00
Mike McQuaid
0a8c8f90b6 Merge pull request #1708 from joshka/feature/install-tap-cmd-completions
install tap cmd completions
2017-02-27 08:42:17 +00:00
Joshua McKinney
25396d9c4d Install tap command completions and manpages
Taps can include completion scripts for external commands under
`completions/bash`, `completions/fish`, or `completions/zsh`. `brew tap`
will automatically install these into the correct directories during
install.
2017-02-26 15:40:52 -06:00
EricFromCanada
afc539f86e Update brew's man page formatting and grammar
Also update command specifications to match descriptions.
2017-02-25 17:37:57 -05:00
Markus Reiter
9d512be63c Convert brew irb test to spec. 2017-02-23 21:19:30 +01:00
Zhiming Wang
95f9af24d3
update-report: unlink rather than uninstall --force formula when ...
migrating a formula to a cask.
2017-02-17 19:21:27 -05:00
Mike McQuaid
8a10a413a4 Merge pull request #1995 from MikeMcQuaid/log-follow-renames
log: follow renames.
2017-02-13 08:34:12 +00:00
Mike McQuaid
75bdded6f2 Merge pull request #1994 from MikeMcQuaid/prefix-opt
--prefix: use opt_prefix when available.
2017-02-13 08:32:54 +00:00