6914 Commits

Author SHA1 Message Date
Martin Afanasjew
eb5d90c1df unlinkapps: avoid deleting too many symlinks
Use `start_with?` to make sure the symlink actually points into one of
the Homebrew directories (depending on given arguments). Previously,
only a substring match was used, which would also remove a symlink to a
hypothetical `/opt/unrelated/usr/local/opt/Unrelated.app`. Even if
unlikely to occur, altering stuff unrelated to Homebrew is bad.

Furthermore, make sure to always use a trailing slash with directories.
Otherwise, e.g., `brew unlinkapps qt` will unlink .app bundles of both
`qt` and `qt5` if both are installed and `brew linkapps qt qt5` was
issued before. (Please ignore that `qt` and `qt5` offer a conflicting
set of .app bundles. This will have to be addressed elsewhere.)

Closes Homebrew/homebrew#45174.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-20 08:38:54 +01:00
Patrick Stadler
3dda14f5bd Provide better link when rate limit exceeded error is thrown
Closes Homebrew/homebrew#45134.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-20 08:38:53 +01:00
Xu Cheng
8755e91675 test-bot: remove duplicated conflicts unlinking 2015-10-20 14:54:10 +08:00
Xu Cheng
e13866f74a test-bot: install bottle unneeded formulae in --fast mode 2015-10-20 14:53:50 +08:00
Xu Cheng
1a0f64d5f8 test-bot: don't use --build-bottle flag if bottle disabled 2015-10-19 21:50:12 +08:00
Xu Cheng
4ef15427ba add test for bottle disable
Closes Homebrew/homebrew#43935.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-19 21:41:36 +08:00
Xu Cheng
f41925b360 allow install bottle unneeded formulae for non Xcode/CLT install 2015-10-19 21:41:36 +08:00
Xu Cheng
c4067cf8bb test-bot: skip bottling if it's unneeded 2015-10-19 21:41:36 +08:00
Xu Cheng
d20d08b5fe bottle: fail if bottle is disabled 2015-10-19 21:41:36 +08:00
Xu Cheng
975771ab35 formula_installer: let build_bottle? check bottle_disabled?
Also don't pour bottle if it's disabled.
2015-10-19 21:41:36 +08:00
Xu Cheng
b5032ad2cb Formula: add bottle disable DSL 2015-10-19 21:41:36 +08:00
Eric Andrew Lewis
5ec396ed38 install: make search output more intuitive.
Closes Homebrew/homebrew#42222.
Closes Homebrew/homebrew#44892.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-19 10:16:40 +01:00
Xu Cheng
b743cadd87 use Utils.popen_read instead of ENV trick to escape path
Closes Homebrew/homebrew#45021.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-18 22:57:43 +08:00
Xu Cheng
646f94adfe move mach.rb to os/mac/mach.rb 2015-10-18 22:57:42 +08:00
Xu Cheng
06806f860d remove unnecessary require statements 2015-10-18 22:57:42 +08:00
Baptiste Fontaine
abfaa59e06 MacOS: full_version added
Closes Homebrew/homebrew#44988.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-18 22:57:42 +08:00
Brian Candler
66078da6e4 owamp: return from boneyard
By including the missing patch inline

See Homebrew/homebrew#43361 and Homebrew/homebrew-boneyard#66

Closes Homebrew/homebrew#44888.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-10-17 02:16:19 +01:00
Xu Cheng
dd7e8f291d downloads: fix undefined local variable
2950e5ab6e (commitcomment-13824130)
2015-10-17 04:00:41 +08:00
Xu Cheng
2130cb8c86 uninstall: fix indent 2015-10-17 03:59:28 +08:00
Xu Cheng
dee4c76e62 uninstall: fix when Cellar doesn't exist 2015-10-17 03:57:40 +08:00
Tim D. Smith
f81d561b67 always use opt_prefix in install_name
dylib install_names are presently rewritten relative to HOMEBREW_PREFIX,
except for keg-only formulas, which are rewritten relative to
opt_prefix.

If we make a formula keg_only, all of its dependents need to be bumped,
since it will no longer exist in HOMEBREW_PREFIX and all of the links
will be written incorrectly.

If we always use opt_prefix, we avoid that dilemma, and make installed
packages more robust if a dependency is `brew unlink`ed.

Closes Homebrew/homebrew#43518.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-10-16 17:22:35 +01:00
Martin Afanasjew
4ac345ca61 utils: improve highlighting in multi-column output
The yellow background made the text unreadable for light-on-dark color
schemes. Fix by making the highlighted text just bold.

Fixes Homebrew/homebrew#45028.

Closes Homebrew/homebrew#45030.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-16 16:08:43 +01:00
Andrew Janke
017a501471 downloads: Fix checkout on initial clone
Moves the "Checking out" output to where checkouts actually happen, to avoid spurious checkout announcements.

Closes Homebrew/homebrew#45019.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-16 09:54:47 +01:00
Martin Afanasjew
e4de6907fd tap-info: tweak output for two edge cases
Improve output in the (rare) cases where a tap offers both commands and
formulae or neither. Also adjust code to stay below the 80 column limit.

Closes Homebrew/homebrew#44995.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-16 09:12:30 +01:00
Martin Afanasjew
7044bf7bbf update: report tap updates and improve wording
Closes Homebrew/homebrew#43468.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-16 09:12:29 +01:00
Martin Afanasjew
21d804eeb8 commands: ensure external commands are executable
For consistency with `brew command` and the logic in `brew.sh` (both use
`which` to find/validate an external command), we need to filter files
that are not executable.

Otherwise `brew commands` and thus bash completion will offer commands
that will produce an error when attempting to use them.

Closes Homebrew/homebrew#44999.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-15 19:26:27 +01:00
Xu Cheng
b5ec74c3f6 search: various improvement
* Move listing all formula names in the top to speed up shell script.
* Simplify logic.
* Only search PR and check bad regex for tty?, which will benefit to
  shell script.

Closes Homebrew/homebrew#44985.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-15 17:24:41 +08:00
Xu Cheng
135efb39b8 search: highlight installed formulae 2015-10-15 17:24:41 +08:00
Xu Cheng
79018e4e24 test-bot: remove unused --tap args for brew bottle 2015-10-15 16:25:17 +08:00
Xu Cheng
d162aab9c6 test-bot: ensure cleanup is running
Closes Homebrew/homebrew#44982.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-15 09:05:51 +01:00
Xu Cheng
c247a5b462 test-bot: merge formula's bottle before test
Fixes the bug described in
https://github.com/Homebrew/homebrew-science/pull/2866#issuecomment-148298146
2015-10-15 09:05:51 +01:00
Xu Cheng
1da0583634 bottle: allow --merge --write without commit 2015-10-15 09:05:51 +01:00
Martin Afanasjew
0114a26483 update: highlight installed formulae in report
Closes Homebrew/homebrew#44335.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-15 08:55:47 +01:00
Mike McQuaid
aeea953270 test-bot: readd missing --build-bottle. 2015-10-14 18:52:31 +01:00
Baptiste Fontaine
362da26ff6 test-bot: ensure install_passed is always defined 2015-10-14 17:40:14 +02:00
Baptiste Fontaine
f3035333fb FormulaValidationError: include full_name
Closes Homebrew/homebrew#44946.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-14 16:21:42 +02:00
Martin Afanasjew
4cf703d5d8 utils: highlight items in column-wise output
Closes Homebrew/homebrew#44343.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-14 15:07:57 +01:00
Martin Afanasjew
c3e7a64648 utils: re-implement and improve column-wise output 2015-10-14 15:07:57 +01:00
Vlad Shablinsky
e04a463f11 update: allow updating from local branch
Closes Homebrew/homebrew#44893.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-14 14:01:27 +01:00
Mike McQuaid
667fa65be8 test-bot: make master builds faster.
Just do a few things rather than doing e.g. a full compile.

Closes Homebrew/homebrew#44936.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-14 14:01:11 +01:00
Xu Cheng
3d585d6e3f add Formula#aliases
Fixes Homebrew/homebrew#44331.

Closes Homebrew/homebrew#44709.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-14 17:26:41 +08:00
Xu Cheng
98633e03c6 add alias_table and alias_reverse_table for core and tap 2015-10-14 17:26:41 +08:00
Xu Cheng
65488903f9 add Formula.core_alias_files 2015-10-14 17:26:41 +08:00
Xu Cheng
d1222971f6 test-bot: update diff_start_sha1 unconditionally
See bfab4b0e65db4667ab09159b1040701fa75ec687

Closes Homebrew/homebrew#44889.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-14 00:04:57 +08:00
Søren Brokær
ed42b2eb39 let the user know what exactly was already tapped
Closes Homebrew/homebrew#44843.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-13 14:03:42 +02:00
Xu Cheng
76a5ba6ae5 test: allow writing to certain var directories
Closes Homebrew/homebrew#44458.

Closes Homebrew/homebrew#44773.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-10 11:54:10 +08:00
Xu Cheng
52de8d9373 postinstall: sanitize ARGV options 2015-10-10 11:19:22 +08:00
Xu Cheng
8c4bd3dae2 audit: use ARGV.resolved_formula
There are audit rules which check cellar. Therefore, we need
`ARGV.resolved_formula` to get proper spec and prefix.

Closes Homebrew/homebrew#44781.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-10 01:34:43 +08:00
Xu Cheng
fe3b69d388 test: sanitize ARGV options
Otherwise, it will use the wrong prefix to test devel/HEAD install.
2015-10-10 01:34:42 +08:00
Xu Cheng
60ba8beefa Formulary.from_rack: better formula resolution strategy
The flow is as follow:
* If tap is nil(DIY install), search using name.
* If tap is found, search using full name.
* If tap is found and full name searching failed, search using name.
  This usually means the formula may be migrated to different tap.

Closes Homebrew/homebrew#44771.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-10 01:34:36 +08:00