9434 Commits

Author SHA1 Message Date
Eitot
4333bce850 Clarify opt-out commands
* Clarify opt-out commands

* Partially rewrite opt-out paragraph
2016-04-27 14:49:09 -05:00
Christian Moritz
bc98fd3788 Language::Node.npm_install_args: add helper method (#37)
* add Language::Node helper module

This adds a language module for Node module based formulas.
It contains the 2 public methods `std_npm_install_args(libexec)` and
`local_npm_install_args`:

* `std_npm_install_args` is intended to be used in formulas for
  standard node modules and returns `npm install` args for a global
  style module installation to libexec.
* `local_npm_install_args` is for formulas, in which the `npm install`
  step is only one of multiple parts of the installation process and
  returns `npm install` args for a default local installation in place.

Both methods have in common, that they are

* making sure that a working copy of npm and node-gyp from node's
  libexec is prepended to the PATH (to not rely of a user managed npm)
* seting the npm cache to HOMEBREW_CACHE/npm, which fixes issues caused
  by overriding $HOME resulting in long install times + high disk usage
  (see https://github.com/Homebrew/brew/pull/37#issuecomment-208840366)

* audit: update npm install check for Language::Node

* cleanup: remove npm_cache too

* doc: add Node-for-Formula-Authors.md
2016-04-27 17:08:44 +01:00
Andrew Janke
05efd70dc3 Analytics: Separate user-supplied and internal-use DISABLE_ANALYTICS (#155)
This prevents `brew` self-calls from interacting with the stickiness of
HOMEBREW_NO_ANALYTICS being persisted to the brew repo and accidentally
disabling analytics permanently when it should have been for just one run,
while restoring the stickiness of an explicit user-supplied
HOMEBREW_NO_ANALYTICS.
2016-04-26 04:28:38 -04:00
Xu Cheng
7aaaf9d8db fix setup-analytics (#154)
DO not invoke git config because HOMEBREW_NO_ANALYTICS, otherwise
it will disable analytics for everyone when running `brew update`
in following manners:
 * `brew update` will set HOMEBREW_NO_ANALYTICS because the absence of
   `homebrew.analyticsmessage`
 * `brew update-report` will set `homebrew.analyticsdisabled` because of
    HOMEBREW_NO_ANALYTICS.

Also reduce file IO.
2016-04-26 15:53:52 +08:00
Andrew Janke
be336159fb doco: add Prose Guidelines (WIP)
Closes #128.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-25 23:10:10 -04:00
Zev Eisenberg
0c95c60511 doco: analytics: fix typo
Closes #150.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-25 21:12:23 -04:00
Milkey Mouse
822ea6057b Fix a minor typo
Closes #149.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-25 20:40:33 -04:00
Mike McQuaid
df489cfde2 More analytics tweaks.
Provide a single command that can be run to disable analytics, run it if
`HOMEBREW_NO_ANALYTICS` is ever set and remove the user UUID file in
that case too.

References https://github.com/Homebrew/brew/issues/142.
2016-04-25 18:51:00 -05:00
Mike McQuaid
421cd5365f Point to analytics documentation on brew update.
Make sure that users are notified on the first run of `brew update`
after we enabled analytics about how it works and how to opt-out. This
will be shown to all users who have not already seen this message from
`brew update` or through a new Homebrew installation.

References https://github.com/Homebrew/install/pull/42
References https://github.com/Homebrew/brew/issues/142
2016-04-25 18:05:30 -05:00
Mike McQuaid
663f51b88e keg_relocate: don't assume .la files are in lib.
Sometimes they are in e.g. libexec but there's no real reason to assume
they are anywhere; we want to relocate them regardless.
2016-04-24 22:06:14 +01:00
Mike McQuaid
1451553188 Ship analytics for Homebrew.
For more information and opt-out instructions please read:
https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md#analytics
2016-04-23 14:27:09 +01:00
Misty De Meo
c20622ade4 JavaRequirement: return false if no java_home
Closes #118.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2016-04-22 22:37:21 -07:00
Misty De Meo
da643d942e Explicitly list -arch in LDFLAGS on Leopard 2016-04-22 22:37:21 -07:00
Misty De Meo
765cd216f0 Reenable HOMEBREW_PREFER_64_BIT 2016-04-22 22:37:21 -07:00
Misty De Meo
2f7721f1b4 Add :expat special dependency
This will be expanded to a full expat dependency on Tiger alone.

Fixes mistydemeo/tigerbrew#30.
2016-04-22 22:37:21 -07:00
Misty De Meo
0f7caa154f Tiger tar requires explicit format 2016-04-22 22:37:21 -07:00
Misty De Meo
2c9fd850f3 Use GCC 4.2 as the default compiler when installed 2016-04-22 22:37:21 -07:00
Misty De Meo
06a356d9ec STANDARD_COMPILERS: add Xcode 2.0 2016-04-22 22:37:21 -07:00
Misty De Meo
967fa41e41 Set -faltivec in CFLAGS on Tiger
Setting -mcpu and -mtune on Tiger with gcc-4.2 exposes a bug in one of the
system headers, causing certain builds to fail. This can be fixed by
adding -faltivec to CFLAGS.

See: http://trac.macports.org/ticket/34213
2016-04-22 22:37:21 -07:00
Misty De Meo
6f6b1111f0 Mac: don't call xcrun on Tiger 2016-04-22 22:37:21 -07:00
Misty De Meo
6b8af260c2 subversion: don't use system APR on Tiger 2016-04-22 22:37:21 -07:00
Misty De Meo
9ead6bc2f8 Update CompilerSelectionError
Fixes mistydemeo/tigerbrew#207.
Fixes mistydemeo/tigerbrew#330.
2016-04-22 22:37:21 -07:00
Misty De Meo
2008c880dd Add a helper to determine make path on Tiger 2016-04-22 22:37:21 -07:00
Misty De Meo
2d81c6878f Hardware: PPC970 needs -m64 to build 64-bit
Fixes mistydemeo/tigerbrew#37.
2016-04-22 22:37:21 -07:00
Misty De Meo
a662bd4470 config: return early if java_home is missing
Fixes mistydemeo/tigerbrew#365.
2016-04-22 22:37:21 -07:00
Andrew Janke
258a764f67 stage: fix block signature back-compatibility under Ruby 1.8.7
The new stage() signature introduced by #66 breaks back-compatibility
under Ruby 1.8.7. This fixes it by switching back to a one-argument
block signature and using a new class to wrap both the Resource and
Mktemp info for the staging context, in a signature-back-compatible
way.

Addresses homebrew/homebrew-core#529.

Closes #135.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-22 21:49:00 -04:00
Mike McQuaid
2921795668 update: rebase (rather than merge) by default.
We want to always avoid merge commits being committed to Homebrew so
this feels like a better fit.
2016-04-22 10:06:59 +01:00
Mike McQuaid
341b64cc96 Formula-Cookbook: better inreplace example.
Make multiple replacements if using the block form.
2016-04-22 09:58:40 +01:00
Mike McQuaid
26118d6225 caveats: recommend brew services for plists.
It simplifies the number of commands and it's now an officially
supported command again.
2016-04-22 09:48:34 +01:00
Martin Afanasjew
b5c27bb7e5 readall: also check 'brew.rb' for issues
Closes #119.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-22 00:47:43 +02:00
Martin Afanasjew
30c0d97e5c readall: stop using no longer needed 'nostdout'
Since switching from `system` to `Utils.popen_read` we no longer need to
suppress Ruby's output of `Syntax OK` to `$stdout`.
2016-04-22 00:47:43 +02:00
Martin Afanasjew
a61829da46 readall: fail on Ruby syntax warnings
Previously, syntax warnings were printed, but didn't cause `readall` to
exit with a non-zero exit code. Now they do, making it easier to catch
accidentally introduced syntax warnings in the test bot.
2016-04-22 00:47:43 +02:00
Logan Rosen
cbc24a715c CONTRIBUTING : fix link to troubleshooting (#133)
The current one returns a 404.
2016-04-21 21:38:10 +01:00
Andrew Janke
4d35dd3fbb doco: "How to PR": do audit while revised formula is installed
Reorders the PR submission steps so `brew audit` is done after `brew install`,
so it can pick up issues with the installed formula, like non-executable stuff
in `bin/`. Matches the `test-bot` process better.

Minor style changes, including consistently using periods at the end of list items
which are complete imperative sentences.

Closes #127.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-21 15:22:34 -04:00
Andrew Janke
094f6f47dd Formula: include bad value in invalid-option error message
Makes identifying which line in a formula has the bad use of 'option' easier.

Closes #120.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-21 15:21:44 -04:00
Andrew Janke
a3b70d38a7 brew-audit: pull style checks in to main audit output
This collects all violations for each formula in a single place, instead
of doing `brew style` outputs for all formulae first, and then the other
audit checks.

Closes #112.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-21 14:45:33 -04:00
Misty De Meo
534d6fd527 Move OS::Mac::Xcode.provides_autotools? to compat
Closes #125.

Signed-off-by: Misty De Meo <mistydemeo@github.com>
2016-04-21 09:36:31 -07:00
Misty De Meo
f5f41f2079 doctor: remove autotools check 2016-04-21 09:36:30 -07:00
Misty De Meo
35385e8c59 stdenv: stop setting ACLOCAL_PATH 2016-04-21 09:36:30 -07:00
Mike McQuaid
00736276fe brew.rb: uninstall old Homebrew Cask. (#121)
This version is never wanted at this point and it will help Homebrew
Cask deal with the annoying errors that result from having this version
still around (some which I've already help users debug).
2016-04-21 16:36:34 +01:00
Mike McQuaid
2671b9f55d analytics: roll tracking ID.
Someone else has been sending weird data to ours and it has bad initial
test data so let's roll it before we ship it to everyone on Saturday.
2016-04-21 08:06:12 +01:00
Martin Afanasjew
b53f0c5ada tests: expand help and help-related tests
Closes #114.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-20 13:46:10 +02:00
Martin Afanasjew
d9363a1559 exceptions: add reason to 'UsageError' exception
Use the `reason` attribute to be able to handle `UsageError` subclasses
more uniformly and simplify logic in `brew.rb` to handle them together.
2016-04-20 13:46:10 +02:00
Martin Afanasjew
cf3486f98a help: show command-specific help for invalid usage
Instead of always printing the generic help text, print command-specific
help if it is available and a command raised the `UsageError` exception.
Put the error message underneath the help text (was above) to avoid that
it scrolls off the screen.

Thereby fix a regression where handling the invalid usage would fail to
access `ARGV.usage` removed in c6536066dc39da653d265640c6ba6046bb5def98.
2016-04-20 13:46:10 +02:00
Martin Afanasjew
557ad956fd help: refactor (again) and fix code style issues
Turns out making `empty_argv` a boolean argument for `Homebrew.help` was
not the best idea and having command-to-path mapping and help extraction
in a single method is not flexible enough.

Also only complain about missing help text when `HOMEBREW_DEVELOPER=1`
and otherwise just print the generic help text.
2016-04-20 13:46:10 +02:00
Martin Afanasjew
4f8e3cae5e help: improve styling of generic help text
Format the usage examples more consistently (particularly parentheses
instead of square brackets where one of several alternatives has to be
picked). And add the now much more useful `brew help <command>`.

Closes #113.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-20 13:45:26 +02:00
Martin Afanasjew
312fdaa892 --version: move help to documentation comment
This implies that `--version` is treated in most places like a regular
command, e.g. being suggested in shell completion. Also fix the help
text that claimed output goes to standard error, while it actually goes
to standard output.
2016-04-20 13:45:26 +02:00
Martin Afanasjew
76f0479969 --repository: move help to documentation comment 2016-04-20 13:45:26 +02:00
Martin Afanasjew
6931e9421a --prefix: move help to documentation comment 2016-04-20 13:45:26 +02:00
Martin Afanasjew
a3352c000e --env: move help to documentation comment 2016-04-20 13:45:26 +02:00