3334 Commits

Author SHA1 Message Date
Mike McQuaid
f951a22bea Install etc/var files on postinstall.
Also, don't delete them after that. This means that `brew postinstall`
becomes a way to easily reinstall configuration files for any formula
without needing any changes to any bottles or requiring a reinstall.
2017-05-03 09:00:17 +01:00
Gautham Goli
c3330c289d Add --only-cops,--except-cops options for brew audit
Also refactor audit cops into two "departments"
 - FormulaAudit
 - FormulaAuditStrict
2017-05-02 23:26:12 +05:30
Gautham Goli
a4568a8697 Let cops run without --strict flag 2017-05-02 23:14:44 +05:30
Markus Reiter
22f624b373 Make PATH enumerable. 2017-04-30 21:11:28 +02:00
Markus Reiter
f8ad9d7efd Use PATH where possible. 2017-04-30 21:11:27 +02:00
Markus Reiter
2bda194bd9 Add GitHub::search_code method. 2017-04-25 12:29:01 +02:00
Mike McQuaid
228239af31 Allow forcing Homebrew GitHub organisation.
On Linux this defaults to Linuxbrew but in some cases (i.e. a Linux
machine performing uploads for Homebrew) we want to allow this to be
overridden back to the defaults.

Relies on a change incoming to `brew test-bot` to set this there.
2017-04-25 09:13:36 +01:00
Mike McQuaid
b3c69aba87 search: use single HTTP call for tap searches.
Use GitHub's code search API to search using the filename based on the
search query. This means we only need a single HTTP call and no more
multithreading madness. This also means we're able to search everything
in the Homebrew and Caskroom organisation by default without having to
maintain a list of things to search (and not) in here.
2017-04-24 14:11:04 +01:00
Mike McQuaid
ba3c46d24f More deprecations.
Deprecate more methods. Internal APIs have been verified to be unused
elsewhere and removed. External APIs have had deprecation methods added.
Existing deprecations have been either upgraded to produce warnings or
no longer deprecated and the reasoning documented.
2017-04-22 16:28:07 +01:00
Markus Reiter
6ce84c4fb8 Add OFFICIAL_CASK_TAPS in official_taps.rb. 2017-04-20 05:22:34 +02:00
Markus Reiter
3c017a7405 Lowercase Caskroom in search. 2017-04-20 05:22:34 +02:00
Mike McQuaid
1330b74416 install: don't search when formula is unreadable.
These formulae are detected as missing but exist in an unreadable form.

Fixes #2485
2017-04-18 08:43:39 +01:00
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