9579 Commits

Author SHA1 Message Date
Mike McQuaid
e825f59754 audit: check for block inreplace with single sub. (#254)
There are unnecessarily verbose, have been documented to be avoided and
it’s good to nudge people towards the other style.
2016-05-19 20:38:46 +01:00
Mike McQuaid
d2c9a923ea .github/*: point to Homebrew Evolution repository. (#259)
Indicate that feature requests should go there rather than here.
2016-05-19 20:38:38 +01:00
Mike McQuaid
b8e5ff431d audit: check more GitHub URLs. (#256)
GitHub’s code load and patch-diff URLs are the result of redirects and
make it harder to modify the URL to reach the original repository.
2016-05-19 07:56:11 +01:00
Zhiming Wang
bc1d5ae4d4 install: fix documentation of --keep-tmp option (#258)
Obvious copy/paste failure in acc9a7ca8554bc2413dee2d6d0f407b3a59c628c.
2016-05-19 08:43:42 +02:00
Martin Afanasjew
406fdbb391 brew.sh: drop obsolete source in update-preinstall
No need to source `cmd/update.sh` if `homebrew-update` is not going to
be called directly. Amends 750bb24a787dc6e4a13f2b842a3e8dcb8d5fb761.
2016-05-18 18:26:05 +02:00
Mike McQuaid
95c3a31b33 Revert "Switch to bbatsov's Style Guide since GitHub's is 404" (#250) 2016-05-18 09:44:36 +01:00
Paolo G. Giarrusso
2f20a42292 Synchronize counts for link and unlink (#242)
Closes #239.
2016-05-15 12:07:58 +01:00
Mike McQuaid
aae447996c formula: deprecate startup_plist.
Closes #228.
2016-05-13 08:45:37 +01:00
Xu Cheng
77836cfb3f fix shellcheck complaint 2016-05-13 14:41:29 +08:00
Xu Cheng
6eb2287221 move git shell function to brew.sh
git is also used in analytics.sh
2016-05-13 14:40:14 +08:00
Xu Cheng
750bb24a78 brew.sh: use brew update in update-preinstall
Preinstall update should be performed in a separate process,
so it can maintain and close its own update lock.
2016-05-13 14:39:16 +08:00
Xu Cheng
92934db202 move brew shell function to brew.sh 2016-05-13 14:37:18 +08:00
Andrew Janke
2044294a86 brew pull: fix bogus line that was raising warning 2016-05-12 09:09:31 -04:00
Xu Cheng
1b6a200809 update: use lock
Closes #181.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-05-12 15:36:46 +08:00
Xu Cheng
ad8f50ec6d add utils/lock.sh
a Bash implementation of lock using `flock(2)`.
2016-05-12 15:36:46 +08:00
Martin Afanasjew
1087df1016 ARGV: fix 'value' method, make it more predictable
The fix changes behavior in same cases, but those cases were all either
broken or showed unexpected behavior. The new behavior is very simple:

- If an argument starts with `--<option-name>=`, return whatever comes
  after the equals sign.

Prior to this change, `ARGV.value` showed some unexpected behavior:

- `ARGV.value("foo")` returned `nil` for `--foo=` because at least one
  character needed to be present after the equals sign. (All other
  option parser implementations I'm aware of allow for empty values.)

- `ARGV.value("bar")` returned `"baz"` for `--foo=--bar=baz` because the
  regular expression was not anchored to the start of the argument.

- `ARGV.value("++")` raised an exception because the string wasn't
  escaped for use in the regular expression. (An unlikely corner case.)

Closes #231.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-05-12 08:09:19 +02:00
Martin Afanasjew
2e961dc9de formula_installer: fix option-with-value handling
When passing formula options with value, e.g. `--with-qt=5`, to the
child process responsible for building a formula, `ARGV.value` would be
invoked with `nil`. Handle this more elegantly (no change in behavior).

For consistency, use a regular expression adapted from `Options.create`
instead of the somewhat bogus one used before.
2016-05-12 08:09:19 +02:00
Dominyk Tiller
745a1312dc pull: insert questionable syntax hack
I'm not completely sure this is "sane" logic but I'm leery of just reverting
Andrew's work this morning and making him rebuild that PR from scratch for one
syntax issue.

Sadly, because we run:
```
brew readall --aliases --syntax
```
On every CI job, and that flags this line previously as:
```
pull.rb:555: warning: possibly useless use of a variable in void context
```

Every single PR has "failed" since it was merged, and it's reached the point
of being a bit annoying, so let's try this.
2016-05-12 00:29:29 +01:00
Andrew Janke
b5a44161a4 cmd/pull: add retry to curl bottle download (#232)
Works around issue with GET and HEAD apparently acting differently, and
bottle downloads failing even after successful polling completion.
2016-05-11 09:52:35 -07:00
Andrew Janke
63ea9295cf brew audit: add --display-filename format option for easy grepping (#221) 2016-05-11 09:19:45 -07:00
Mike McQuaid
5f06312916 cmd/pull: bump retry count. 2016-05-10 09:06:59 +01:00
Mike McQuaid
5c1f463ac0 Move more methods to DevelopmentTools.
Closes #1028.
2016-05-10 08:19:48 +01:00
Martin Afanasjew
500f9eada8 update: fix hyphen counting (legacy tap renaming)
Fix regression introduced in fafe8f0f53bf91fc41f016b5c2af41ca712783f7.
Counting the number of hyphens in a string cannot be done in a single
expression, thus split this and introduce another local variable.

Fixes #227.
2016-05-09 21:00:26 +02:00
Martin Afanasjew
93e0f4f946 update: remove stray comma (legacy tap renaming)
Fix regression introduced in fafe8f0f53bf91fc41f016b5c2af41ca712783f7.
2016-05-09 21:00:09 +02:00
Martin Afanasjew
5a90e7190b fetch: document --retry option (#225) 2016-05-09 15:37:01 +02:00
Sebastian Staudt
57bf33302a extend/os/linux/hardware/cpu: fix typo.
CPU was transformed into a class in 8d995e961f549e555f405d2567235dab53f6baad.
2016-05-09 08:41:30 +01:00
Jam
a558629654 gist-logs: add proper documentation, improve error handling (#217) 2016-05-09 04:39:22 +02:00
Martin Afanasjew
815edc0686 Update man page to pick up changes made in #205.
Seems like last-minute changes were made without re-running `brew man`.
2016-05-09 01:33:19 +02:00
Martin Afanasjew
4059d5fc26 compat/macos: fix methods from 'development_tools'
The previous fixes in c6dc50fcf05c8c4956ac86345360fefcb00f664e and
ed9f7308b265944c27c833b9a2aaa0e911ff5667 were incomplete as they
referenced `DeveloperTools`, but the actual name is `DevelopmentTools`.

Also fixes indentation and a broken `MacOS.clang_version` (it was
falsely redirecting to `DeveloperTools.llvm_build_version` ).

References #219.
References #220.
2016-05-08 23:30:06 +02:00
Mike McQuaid
c6dc50fcf0 compat/macos: add missing require.
Closes #220.
2016-05-08 21:12:22 +01:00
Martin Afanasjew
4ea2f9dc91 Fix more bad dump_verbose_config references
Follow-up to c7edf9a063dce63afb9ab54b6d71fe864d578365 and related to
changes from #168.
2016-05-08 21:43:57 +02:00
Mike McQuaid
c7edf9a063 gist-logs: fix system_config reference. 2016-05-08 20:38:17 +01:00
Mike McQuaid
ed9f7308b2 compat/macos: add missing developer_tools methods.
Closes #219.
2016-05-08 19:44:00 +01:00
Martin Afanasjew
44af0d80e8 utils/bottles: fix Regexp escaping for Ruby 1.8
Make sure `Regexp.escape` gets a string as Ruby 1.8 is unable to convert
the symbol to a string automatically. Related to changes from #168.
2016-05-08 20:35:52 +02:00
Martin Afanasjew
86fa42b36c tab: fix bad default_compiler reference
Partially addresses #219. Related to changes introduced in #168.
2016-05-08 20:12:51 +02:00
Mike McQuaid
504152038c os/mac/sdk: fix bad locate reference.
Closes #216.
2016-05-08 17:23:47 +01:00
Mike McQuaid
59de2c7ecf pull: fix bottle_tag references. 2016-05-08 17:18:19 +01:00
Mike McQuaid
0158fc6da8 test_integration_cmds: print output on failure. (#213)
Makes it easy to debug what’s gone wrong.
2016-05-08 17:12:31 +01:00
Mike McQuaid
bb72260606 tests: add generic flag. (#212)
Makes it easier to quickly do tests of the generic/cross-platform
backend.
2016-05-08 17:12:14 +01:00
Mike McQuaid
61614d3529 test_integration_cmds: add cleanup test. 2016-05-08 17:11:57 +01:00
Mike McQuaid
181ebbfaeb os/mac/xcode: fix development tools reference.
Closes #216.
2016-05-08 17:07:24 +01:00
Mike McQuaid
c5bfc932a6 cleanup: fix bottle reference.
Closes #214.
Closes #215.
2016-05-08 17:05:25 +01:00
Mike McQuaid
549c86dfe2 brew.rb: check issues url properly. 2016-05-08 17:02:02 +01:00
Mike McQuaid
9e7b8c61a9 Make config command cross-platform.
Closes #168.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-05-08 16:51:22 +01:00
Mike McQuaid
e316cc9296 Make development tools code cross-platform. 2016-05-08 16:51:22 +01:00
Mike McQuaid
8d995e961f Make hardware code cross-platform. 2016-05-08 16:51:22 +01:00
Mike McQuaid
8a582f2bd9 Make diagnostic code cross-platform. 2016-05-08 16:51:22 +01:00
Mike McQuaid
931e292bf1 Make bottle code cross-platform. 2016-05-08 16:51:22 +01:00
Mike McQuaid
ddb576b582 Add support for testing generic OS.
If the environment variable HOMEBREW_TEST_GENERIC_OS is set ensure that
neither Mac nor Linux-specific code is loaded. This allows easier
testing of cross-platform code on OS X and will make it easier to port
Homebrew to platforms other than OS X and Linux.
2016-05-08 16:51:22 +01:00
Dominyk Tiller
c5520d0050 languages: flag missing dependency requirement (#194)
This is in part designed to handle situations described in https://github.com/Homebrew/legacy-homebrew/issues/42273
where we tell someone to install a special dependency, but because we (rightly, IMO)
resolve special dependencies first users can end up being told to execute a command
on a tool that isn't yet installed and isn't immediately obvious how to install it.

In the situation raised there, with the `sile` formula people are being told to
`luarocks install xyz` but we hadn't installed Lua for them first, so they just
get a `command not found: luarocks` message. Perhaps it should be obvious enough
how to install said tools by looking at the formula's dependencies,
but it's not a huge burden on us to make life easier than that.

Shuffled over from https://github.com/Homebrew/legacy-homebrew/pull/42576.
2016-05-07 20:58:20 +01:00