3228 Commits

Author SHA1 Message Date
Martin Afanasjew
cf3806e747 tap-info: expand and correct help text 2016-07-10 23:20:56 +02:00
Dominyk Tiller
e9925d6177
audit: flag incorrect language/go requires 2016-07-10 21:26:39 +01:00
Dominyk Tiller
1022bcff06
update: mimic doctor permissions advice
We might as well be consistent about it, since it's not obvious to people
what the next step is after we've pointed out the directory isn't writable.

Fixes #476.
2016-07-10 12:41:08 +01:00
Viktor Szakats
df4982ed08 audit.rb: require https for download.savannah.gnu.org (#438)
and download-mirror.savannah.gnu.org
2016-07-10 01:43:27 +01:00
Martin Afanasjew
eba437e153 bottle: revert overeager rename in method call 2016-07-09 16:50:35 +02:00
Mike McQuaid
f1c4141885 keg_relocate: port to generic OS. (#453) 2016-07-09 13:52:05 +01:00
Mike McQuaid
4da990587f tap: run readall when tapping. (#396)
* readall: move readall logic to new class.

* tap: run readall when tapping.

This will prevent tapping an tap with syntax errors from causing issues
for users.

Fixes #58.
2016-07-09 13:51:19 +01:00
Mike McQuaid
2c792076dc cmd/install: port to generic OS. (#458) 2016-07-08 20:52:07 +01:00
Mike McQuaid
86b1df96b9 Autoupdate tweaks (#442)
* Don't infinitely recurse `brew update --preinstall`.

This could happen when trying to `brew install git` inside `brew update
--preinstall`.

* update.sh: cache Git PATH.

We don’t need to look it up from superenv every time; this is slow.

* update.sh: print message before preinstall updates.

* update.sh: verbose output fetch directory.

This aids reading `brew update --verbose --debug` output.

* update.sh: skip taps without formulae on preinstall.

We don’t need to update them as we’re not invoking them.

* update.sh: don't force update-report on developer preinstall.

This is too slow.
2016-07-07 10:24:37 +01:00
Mike McQuaid
3a127e405e development_tools: add installed? method. (#455) 2016-07-06 11:07:24 +01:00
Andrew Janke
f518f57bd8 gist-logs: truncate log files to be gist-friendly (#279)
Truncates each log file to about 1 MB. This avoids upload and
download errors with the gists, and respects GitHub's suggested
size limits.
2016-07-05 08:45:17 -04:00
Mike McQuaid
59074e91d6 diagnostic: more porting to generic OS. (#449) 2016-07-04 18:35:03 +01:00
Mike McQuaid
a1b0ef1300 Remove unnecessary official command tapping. 2016-07-04 18:26:47 +01:00
Mike McQuaid
bf42959609 Revert "Revert "Test officially supported cmd taps. (#390)""
This reverts commit dba1958bd79c1c9d18f215dfc2b806ea62edd1c8.
2016-07-04 17:05:37 +01:00
Martin Afanasjew
dba1958bd7 Revert "Test officially supported cmd taps. (#390)"
This reverts commit 252c701c59227c385ef6178fe99523cca8c843bb.

Taps installed prior to running the test suite are not visible to the
test suite as most Homebrew paths are redefined as to not mess up the
local installation.
2016-07-04 17:41:14 +02:00
Mike McQuaid
252c701c59 Test officially supported cmd taps. (#390)
All of these taps use Homebrew internal APIs (or will shortly) and we
autoinstall them all from `brew $CMD`. We should adjust our CI to ensure
that we never accidentally break these taps when making changes to core
code so that these taps can rely more on this core code rather than
having to e.g. vendor equivalent code that never changes on our end.
2016-07-04 16:08:53 +01:00
Mike McQuaid
468ebc5ed5 install: undocument --force-bottle. (#443)
This is a developer-only option I created for testing purposes. It
should not be used by end-users.
2016-07-04 14:03:03 +01:00
Mike McQuaid
3e982b9720 tests: default to testing offline. (#430)
Set HOMEBREW_NO_GITHUB_API to allow running all tests (but search's
integration test specifically for now) offline. This can be overridden
with `--online`.
2016-07-04 13:32:58 +01:00
Martin Afanasjew
a49f3a8e91 style: use RuboCop 0.41.1 (#433)
Tweak `Style/NumericLiteralPrefix` cop settings as we're using octal
literals a lot (both in formulae and the package manager) for file
permissions and aren't ready just yet to transition them to the more
beginner-friendly `0o` prefix (instead of the more obscure `0` prefix).
2016-07-04 07:19:44 +02:00
Mike McQuaid
0478c2fc0f update-report: prune on cask migration. (#428)
Do this to ensure that any symlinks in the Homebrew prefix and/or in
Applications are removed to stop issues with stale symlinks causing
Casks from being installed correctly.
2016-07-03 14:34:38 -05:00
Xu Cheng
d4e8d3df0a
bottle: add --skip-relocation flag to skip keg relocate
This flag is indented to be used in `homebrew/portable` to build vendor
ruby/git/curl.
2016-06-30 15:26:04 +08:00
Tim D. Smith
9b36e83771 Add magic token to hide commands from man page
Closes #402.
2016-06-29 09:01:36 -07:00
Tim D. Smith
be3d33ea36 Document command line options for brew tests 2016-06-29 09:00:46 -07:00
Vlad Shablinsky
da06e813c2
cmd/install: use migration_needed?
Closes #411.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-06-29 21:04:28 +08:00
Martin Afanasjew
d4f5f0cec7 brew.sh: rename 'chdir' to 'safe_cd'
This is inspired by `safe_system` with basically the same implication
(fail on error), making the name a lot less confusing and avoiding a
clash with the `chdir` function previously defined in `bin/brew`.

Closes #414.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-06-29 13:38:50 +02:00
Zhiming Wang
cb711a2d39 create: add --tap option (#389)
This commit adds a --tap option to the create command such that a user
could create a formula in a specified tap instead of the core.
2016-06-24 08:23:41 +02:00
Martin Afanasjew
e2e35def35 bottle: avoid raising exception in ensure block
The `ensure` block can be reached before the tab is modified (and thus
before `original_tab` gets populated). Avoid raising an exception when
attempting to restore a tab that hasn't been modified yet, e.g. because
relocating some of the Mach-O binaries failed.
2016-06-24 06:40:52 +02:00
Viktor Szakats
6bd24a7fb8 audit.rb: require https for ftpmirror.gnu.org (#393)
* audit.rb: require https for ftpmirror.gnu.org

The situation is similar to other mirror redirectors: the server
may subsequently redirect to an insecure url. But it's a step.

* manpage: update HOMEBREW_NO_INSECURE_REDIRECT section
2016-06-22 18:56:10 +01:00
Mike McQuaid
915eed4c64 update-report: remove unconditional cask/formula uninstall. 2016-06-22 13:50:39 +01:00
Anastasia Sulyagina
2d8b4376df update-report: migrate formulae to casks. (#375) 2016-06-22 13:36:17 +01:00
Baptiste Fontaine
af94c4fc50 pull: skip non-ruby files when collecting formulae names
Closes #377.

Signed-off-by: Baptiste Fontaine <b@ptistefontaine.fr>
2016-06-19 23:35:16 +02:00
Mike McQuaid
62dd4b14ba update.sh: quieten checkout. 2016-06-16 10:57:46 +01:00
Xu Cheng
79345592a9
man: auto detect maintainers list 2016-06-14 21:22:07 +08:00
Mike McQuaid
e1f0dec41e update.sh: developers always run update-report.
As they may use e.g. `git pull` which may result in them having formulae
that aren't migrated (and they mind less about the slight slowdown).
2016-06-12 18:28:08 +02:00
ilovezfs
6367508454 deps should respect skip-recommended
For example, `brew deps libass --skip-recommended` shouldn't print
harfbuzz because, even though libass builds with harfbuzz when harfbuzz
is not skipped, we asked to skip recommended, of which harfbuzz is one.

The corresponding change is made for `brew uses` as well.

Thanks to Xu Cheng for contributing the code. Any errors are mine.

Closes #129.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-11 01:26:28 -07:00
Martin Afanasjew
af42deca4a audit: detect more 'pkgshare' candidates (#328)
The new check also allows the `+` operator instead of our (still heavily
preferred) `/` operator for path concatenation and also triggers if the
operator is surrounded by whitespace.

Also recognizes single-quoted strings and uses a back reference to
match the closing quote for a slightly lower chance of false positives.

Closes #322.
2016-06-07 17:46:40 +02:00
ilovezfs
2cd81e5051 update: pop the stash more quietly
git stash pop -q will print "Already up-to-date!" if untracked changes
are being poppped. This quiets it down unless verbose is set.

Closes #320.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-05 07:55:35 -07:00
Mike McQuaid
14657443ce gist-logs: fix new-issue URL. 2016-06-05 12:40:26 +01:00
Martin Afanasjew
656c713d6c bottle: use short formula name in bottle commit 2016-06-03 17:04:07 +02:00
Mike McQuaid
822b05c9c1 cmd/pull: fix HTTP header usage. 2016-06-03 15:32:11 +01:00
Mike McQuaid
8a217dd420 update: tweak stash/checkout behavior. (#312)
Always pop stashed changes for Homebrew developers and only checkout
original branches for them (to avoid users who don't understand Git
ending up "stuck" on branches).
2016-06-03 14:12:36 +01:00
Mike McQuaid
8e0e1642ad Use curl for the GitHub API (#295)
* Move GitHub API module to utils/github.rb.

* Move curl method to utils/curl.rb.

* global: use long curl arguments and an array.

This makes the code more self-documenting.

* utils/curl: support reading curl's output.

* utils/github: use curl instead of open-uri.

It has far better proxy support.

* pull: set Homebrew user agent.

* gist-logs: remove trailing whitespace.

* gist-logs: use first instead of [0].

Easier to read.

* gist-logs: use curl-based GitHub.open method.
2016-06-03 13:05:18 +01:00
Martin Afanasjew
1c00fed119 audit: check Maven Central URLs, prefer redirector (#311)
Should help with being more consistent and makes sure to suggest the
HTTPS redirector even if equally valid HTTP URLs for specific hosts or
`central.maven.org` are used.
2016-06-02 09:36:27 +02:00
Mike McQuaid
4a8fcae3cc update-report: improve cache migration messaging. 2016-06-01 13:03:03 +01:00
Mike McQuaid
8108106cf9 update-report: recreate migration_attempted_file.
If the deletion of `HOMEBREW_CACHE` fails then the
`.migration_attempted` file will have still been deleted so ensure it is
recreated.
2016-06-01 12:47:56 +01:00
Mike McQuaid
52ee7bf9e3 update-report: fix Mavericks check. 2016-06-01 09:49:50 +01:00
Mike McQuaid
a9abbab917 Move HOMEBREW_CACHE to ~/Library/Caches (#292)
* cleanup: accept cache as an argument.

* config: move default HOMEBREW_CACHE to ~/Library.

* brew.1: document new default Homebrew cache.

* update-report: migrate legacy Homebrew cache.
2016-06-01 08:46:33 +01:00
Martin Afanasjew
8b97a00036 style: use RuboCop 0.40 2016-06-01 09:34:58 +02:00
Dominyk Tiller
0a7fcf2979
audit: appease rubocop
Closes #302.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-05-31 13:33:09 +01:00
Dominyk Tiller
331fdba29d
audit: prefer https/s over ftp where known available
The FTP protocol is prone to getting firewalled to death in places, so where
we know we can avoid that by using either secure or more commonly accepted
protocols let's do so.

Examples of output:

```
* Stable: ftp://ftp.cpan.org/pub/CPAN/authors/id/N/NE/NEILB/Time-Duration-1.20.tar.gz should be `http://search.cpan.org/CPAN/authors/id/N/NE/NEILB/Time-Duration-1.20.tar.gz`
* Stable: Please use https:// for ftp://ftp.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.89.tar.bz2
```
2016-05-31 13:32:47 +01:00