10755 Commits

Author SHA1 Message Date
Mike McQuaid
2f1be1f36f test-bot: only test --no-compat for Homebrew/brew. (#286)
This job takes almost a minute and it's not useful for all core taps
to run this.
2016-05-28 18:49:08 +01:00
Mike McQuaid
f946693b56 test-bot: remove support for legacy Homebrew repo. (#287)
We're not really getting any more PRs here and this code makes this file
harder to follow and refactor.
2016-05-28 18:48:51 +01:00
Mike McQuaid
9edb1a7a87 bottle: JSON-related tweaks/fixes. 2016-05-28 16:46:34 +01:00
Mike McQuaid
53b280c592 test-bot: fix tag reference. 2016-05-28 16:10:06 +01:00
Mike McQuaid
6ba466f5d8 Use JSON files for bottle upload data. (#166)
This means that we do not need to read formulae or evaluate Ruby at
upload time.
2016-05-28 15:54:05 +01:00
Martin Afanasjew
9cf2710dc9 os/mac/*_mach: move shared code into 'SharedMachO' (#282)
Both the `CctoolsMachO` and `RubyMachO` module implement a common set of
methods that simplify querying `mach_data`. Move these into a shared
module, that gets included after either of these implementations is
loaded and included in `Pathname`.
2016-05-27 23:13:51 +02:00
Martin Afanasjew
78f8c60343 tests: fix external command test and code style (#281)
The check that `t4` is not an external command would always succeed, but
not because the file wasn't executable, but because it wasn't even found
due to the missing `brew-` prefix.

Also change the valid but atypical file mode from 0744 to 0755 and apply
minor code style fixes.
2016-05-27 23:12:26 +02:00
Martin Afanasjew
aa747b915a development_tools: fix broken 'Xcode' reference
Affects only legacy systems that don't have a `/usr/bin/cc` binary.
2016-05-26 19:02:25 +02:00
Martin Afanasjew
1c581a232c search: add alias -S back to zero-argument help
Amends 132ada2b0ebb3751c0f8f42ca83bb257b55a50fd until we properly figure
out a way of documenting built-in aliases (or not doing that) across all
commands that currently have aliases. See #270 for full discussion.
2016-05-26 17:52:58 +02:00
Joe Gallo
132ada2b0e Clarify brew search usage. (#270)
* Include --desc in brew search help text.
* Update brew search --desc text in README.
* Remove mention of alias in brew search help text to avoid any
  confusion.
2016-05-26 16:45:25 +02:00
Martin Afanasjew
e517e2e41d utils: avoid using 'gem' as an identifier (#278)
Avoid breaking code highlighting of some editors (e.g. Sublime Text)
when `gem` is used as an identifier. This messes up the highlighting
below the first use and makes working with the file rather annoying.
2016-05-26 16:27:53 +02:00
Xu Cheng
75ab94c8ea CurlDownloadStrategy: move no insecure redirect check to _fetch
This mainly fixes the problems for subclasses of CurlDownloadStrategy.
More specifically it fixes two things:
 * It allows the no insecure redirect check to be applied to
   CurlApacheMirrorDownloadStrategy.
 * It fixes previous broken CurlPostDownloadStrategy.

Closes #280.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-05-26 22:13:50 +08:00
Xu Cheng
8b61d7899b DownloadStrategy: preserve timestamp for cp 2016-05-26 22:13:50 +08:00
Xu Cheng
41325bcfa0 HOMEBREW_CURL_ARGS: add -R to preserve remote timestamp
Reference from `man curl`

>  -R, --remote-time
>    When  used,  this will make curl attempt to figure out the time-
>    stamp of the remote file, and if  that  is  available  make  the
>    local file get that same timestamp.
2016-05-26 22:13:50 +08:00
Dominyk Tiller
56375a7b44 audit: minor spacing nit
Closes #248.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-05-26 11:05:10 +01:00
Dominyk Tiller
2c6fa07e6d audit: tweak devel/head tap check
For some reason the existing check seems to have started failing between
March and today. I haven't managed to narrow down why yet but the biggest
change between then and now was the core separation so perhaps related to that.

Perhaps at some point we started considering purely short tap names,
i.e. homebrew/devel-only rather than full tap names, i.e. homebrew/homebrew-devel-only,
in the audit mechanism.

This fixes the current issue whilst retaining the spirit of the original commit:
86d04e94e9
2016-05-26 11:05:10 +01:00
Martin Afanasjew
898cb93f78 brew.sh: fix code style inconsistency
Originally introduced by me in 77975168e0f2d5e6627d049d6055bc159e3fd89d.
2016-05-25 01:53:14 +02:00
Dominyk Tiller
789a26b55f
README: update key expiry 2016-05-24 16:56:25 +01:00
Uladzislau Shablinski
5703ebf496 download_strategy: cvs source_modified_time (#268) 2016-05-24 17:19:18 +08:00
Mike McQuaid
8ecfab8a59 utils/lock.sh: default to system Ruby if available (#271)
This avoids weird issues with custom Rubies.

Closes #253.
2016-05-23 14:36:25 +01:00
Mike McQuaid
d345483de1 formulary: fix comment typo. 2016-05-22 21:29:39 +01:00
Mike McQuaid
375efe0945 Remove LLVM-GCC support. (#252)
At this point it's never a good compiler to use so let's just remove it.
2016-05-22 09:40:08 +01:00
ilovezfs
7b2d1a5b08 Haskell::Cabal: fix overquoting of flags
Since `system` escapes its own spaces, cabal was interpreting
`--flags='webapp s3'` as `+'webapp +s3'` rather than `+webapp +s3`.

Closes #267.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-05-21 15:11:48 -07:00
Mike McQuaid
0123e04fae mirror: add command to mirror to Bintray. (#263)
Used for uploading imagemagick 6.9.4-3.
2016-05-20 11:00:51 +01:00
Dominyk Tiller
a0d008af77 audit: enforce freedesktop secure urls 2016-05-20 10:54:29 +01:00
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