8377 Commits

Author SHA1 Message Date
Xu Cheng
faa6334774 Formula#file_modified?: use Utils.git_available? 2015-09-02 15:24:52 +08:00
Xu Cheng
8d5c445daa homebrew_version_string: check git available 2015-09-02 15:24:52 +08:00
Xu Cheng
71f794260b add git utils
Two methods:
* `Utils.git_available?` checks whether git is installed.
* `Utils.ensure_git_installed!` installs git for users who don't install
  Xcode or CLT.
2015-09-02 15:24:52 +08:00
Alex Dunn
370df177c4 python_requirement: fix ENV for python3
Closes Homebrew/homebrew#43453.
2015-09-01 13:00:01 -07:00
Xu Cheng
01d7f4e766 remove Requirement#pour_bottle?
It's never used since a0a93f1b3b7b2be9b8a319be91086ffe220f8e32.

Closes Homebrew/homebrew#43462.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-01 19:19:13 +08:00
Alex Dunn
79ea14b738 cmd/search: fix filtering of aliases in results
By directly modifying the results array with
`results[i] = "#{name} (installed)"`, it appeared on successive
iterations that the canonical name was no longer in the array, so
aliases were not removed.

See 9efe5b554c (commitcomment-12969631)

Closes Homebrew/homebrew#43433.
2015-08-31 07:54:59 -07:00
Baptiste Fontaine
5dd0f089a3 config: show HOMEBREW_REPOSITORY
Closes Homebrew/homebrew#43423.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-31 09:21:51 +02:00
Baptiste Fontaine
c7450cb510 wps2odt: migrate to boneyard
Closes Homebrew/homebrew#41279.

Closes Homebrew/homebrew#43415.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-31 09:21:27 +02:00
Alex Dunn
431ebba7af cmd/search: mark installed formulae
`brew search emacs`, with homebrew/emacs tapped:
```
real    0m2.586s
user    0m1.138s
sys     0m0.121s
```
Previously:
```
real    0m2.831s
user    0m1.385s
sys     0m0.087s
```

`brew search s`:
```
real    0m2.260s
user    0m1.201s
sys     0m0.114s
```

Previously:
```
real    0m5.953s
user    0m4.827s
sys     0m0.226s
```

Closes Homebrew/homebrew#35696.
Closes Homebrew/homebrew#42662.
2015-08-30 11:29:13 -07:00
Baptiste Fontaine
0f6d3b2923 tap_migrations: fix the sorting 2015-08-30 18:23:25 +02:00
Mike McQuaid
2c959a7d58 More API documentation.
And remove the documented stuff from the `example-formula.rb`.

Closes Homebrew/homebrew#43241.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-29 15:43:16 +01:00
Xu Cheng
77536e39de sandbox: fix log problem for brew test-bot 2015-08-29 19:36:10 +08:00
Baptiste Fontaine
c9c56bc6e9 owamp: migrating to boneyard
Closes Homebrew/homebrew#43361.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-28 19:56:41 +02:00
Baptiste Fontaine
2881d28277 par2tbb: migrating to boneyard
Closes Homebrew/homebrew#43360.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-28 19:56:33 +02:00
William Woodruff
c459349b89 reformat nested heredocs in BuildFlagsError and BuildToolsError to match String#undent behavior
Closes Homebrew/homebrew#43303.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-28 18:02:05 +08:00
William Woodruff
b0d5e17906 tweak String#undent so that only leading whitespace up to the first indentation level is gsubbed, change test_undent to reflect change and add test_undent_nested to test new behavior 2015-08-28 18:02:04 +08:00
Xu Cheng
3b88c070c6 sandbox: better log output
* use syslog filter instead of grep.
* output sandbox log to stdout when verbose and failed.
* output nothing if sandbox log is empty.

Closes Homebrew/homebrew#43325.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-28 17:33:09 +08:00
Xu Cheng
ddb630b01c move sudo -k to formula_installer
sudo -k cannot be used inside sandbox

Closes Homebrew/homebrew#43345.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-28 17:15:29 +08:00
Xu Cheng
a5aba7f7d8 tap: rmdir when tap failed or interrupted
Fixes Homebrew/homebrew#43280.

Closes Homebrew/homebrew#43352.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-28 17:15:23 +08:00
Xu Cheng
3458b99d6e update: secure formula loading in rename
For update, all formula loading need to be secured by `rescue`.
Otherwise it's easy to crash `brew update` for vasty reasons, e.g.
new Formula DSL.

Closes Homebrew/homebrew#43353.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-28 17:15:18 +08:00
Alex Dunn
9520449823 sandbox: allow writing to /dev/zero
Closes Homebrew/homebrew#43344.
2015-08-27 21:46:21 -07:00
Baptiste Fontaine
73fb6760ea gant: migrating to boneyard
Closes Homebrew/homebrew#43326.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-27 16:01:25 +02:00
Martin Afanasjew
1288e3110d update: always report changes to branch 'master'
If the user's working copy is *not* on the 'master' branch, the revision
recorded after the update to the 'master' branch is not the one of the
updated 'master' branch but that of whatever the user's current branch
is. This tends to be not very helpful.

This change records the revision *after* the update to the 'master'
branch, but *before* switching back to the user's current branch prior
to the update, effectively causing the report to show changes to the
'master' branch.

Closes Homebrew/homebrew#42074.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-27 13:53:28 +01:00
Vlad Shablinsky
fc445d97d3 outdated: update error for different taps
Closes Homebrew/homebrew#43269.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-27 13:51:05 +01:00
Vlad Shablinsky
b68562d941 install: fix if isn't migrated 2015-08-27 13:51:04 +01:00
Mike McQuaid
59bd08e992 pull: more formulae fetch outside of main loop.
Closes Homebrew/homebrew#43313.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-27 13:41:06 +01:00
Xu Cheng
451c69d9bd keg: mkpath for mecab 2015-08-27 20:19:00 +08:00
Baptiste Fontaine
49b37466d9 bash completion for tap-pin/tap-unpin added
Closes Homebrew/homebrew#43259.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-27 11:26:13 +02:00
Tim D. Smith
c2dfcf913d test-bot: don't consider optional deps for compiler selection
Fixes test-bot mishandling of optional cross-tap dependencies. Without
this change, since formula.stable.deps includes the optional dependencies but
formula.recursive_dependencies does not, test-bot was trying to select a
compiler for an untapped formula, which raised an error.

Our suspect handling of optional dependencies was exposed by Homebrew/homebrew#43145 /
7184348e822d6745d8a103de104ff9626536bf1e.

Closes Homebrew/homebrew#43237.
2015-08-27 00:27:31 -07:00
Dominyk Tiller
c992749986 doctor: add system curl <10.7 check
Closes Homebrew/homebrew#43283.

Closes Homebrew/homebrew#43298.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-08-26 23:56:10 +01:00
Dominyk Tiller
94bb92b4c1 doctor: add check for SSL_CERT_DIR
Closes Homebrew/homebrew#43154.

Closes Homebrew/homebrew#43277.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-08-26 17:30:36 +01:00
Dominyk Tiller
98499d1d29 sandbox: permit /var/tmp & DerivedData
Long term it would be nice to sandbox everything that writes to DerivedData
but it is essentially a cache directory of sorts.

The downside of allowing stuff to write there particularly is that DerivedData
is notoriously bad at getting cleaned up, so if you do a lot of Xcode-using
installations very quickly, you can chew your disk space up.

Closes Homebrew/homebrew#43276.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-08-25 22:01:24 +01:00
Mike McQuaid
166e33c2ff pull: do fetch after everything else, sleep more.
Use an exponential back-off on the sleep and try the fetch more times.

Hopefully this will mean that we spent less time waiting for Bintray.

Closes Homebrew/homebrew#43240.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-25 16:43:37 +01:00
Daniel Lee Harple
4e5d92dc10 audit: spelling fix
Closes Homebrew/homebrew#43273.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
2015-08-25 08:24:04 -07:00
Baptiste Fontaine
eb93b82cf2 tap-pin: simplify logic 2015-08-25 17:13:37 +02:00
Baptiste Fontaine
86a5d75dff tap-unpin: simplify logic
Closes Homebrew/homebrew#43260.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-25 14:15:38 +02:00
Xu Cheng
1df6e5d331 Formula#file_modfiled?: remove unnecessary git dir check
It's already covered by `$?.exitstatus == 0` in below.
2015-08-25 17:32:39 +08:00
Baptiste Fontaine
e779be1453 update: #each.map is redundant 2015-08-25 09:45:21 +02:00
Tim D. Smith
143709e679 include git sha1 in --version output
HOMEBREW_VERSION doesn't change very often; the repository state is more
interesting.

Closes Homebrew/homebrew#41886.
2015-08-25 00:13:53 -07:00
Dominyk Tiller
b808eed08f formula: use which over locate 2015-08-25 04:18:46 +01:00
Misty De Meo
98bb638f29 Formula#file_modified?: fix for Xcodes without git
Fixes Homebrew/homebrew#43206.
2015-08-24 20:10:53 -07:00
Misty De Meo
cb154116c5 migrator: #each.map is redundant 2015-08-24 19:36:24 -07:00
Alex Dunn
4714818bdf cdimgtools: remove to boneyard
Closes Homebrew/homebrew#41267.

Closes Homebrew/homebrew#43199.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
2015-08-23 10:23:25 -07:00
Xu Cheng
5266ff2739 formula_installer: tweak word 2015-08-23 23:30:14 +08:00
Xu Cheng
27d7244f8c keg: mkpath for lib/gio 2015-08-23 21:43:04 +08:00
Xu Cheng
09c810c7f4 add link_overwrite DSL
Sometimes we accidentally install files outside prefix. After we fix that,
users will get nasty link conflict error. So we create a whitelist here to
allow overwriting certain files. e.g.
  link_overwrite "bin/foo", "lib/bar"
  link_overwrite "share/man/man1/baz-*"

During FormulaInstaller#link, the whitelist conflict files will be
backup into HOMEBREW_CACHE/Backup
2015-08-23 21:43:03 +08:00
Dominyk Tiller
6362b5fdba Formula-Cookbook: wording tweaks 2015-08-22 19:49:20 +01:00
Aldrin Piri
6abf63c99b Formula-Cookbook: document strict audit
Providing specific reference to the --strict option for brew audit.

Closes Homebrew/homebrew#43155.
Closes Homebrew/homebrew#43156.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-08-22 19:49:19 +01:00
Xu Cheng
9f20679366 formula_installer: fix when bottle pouring when creating new bottle
Formula#bottle_specification always exists, while Formula#bottle only
exists if the bottle is available and compatible.
2015-08-22 14:19:22 +08:00
Xu Cheng
62be981016 use Pathname#executable? directly 2015-08-22 13:21:13 +08:00