8757 Commits

Author SHA1 Message Date
Xu Cheng
2d65caaee9 bin/brew: use not operator inside [[ 2016-01-20 16:04:02 +08:00
Xu Cheng
318ce388d7 bin/brew: use full path for xcode-select
Closes Homebrew/homebrew#48197.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-20 13:55:07 +08:00
Xu Cheng
f51587ee74 brew.rb: fix style problem
Generated by `brew style --fix Library/brew.rb`
2016-01-20 13:55:06 +08:00
Xu Cheng
27e8577f94 brew.rb: fix overeager help flag matching 2016-01-20 13:55:06 +08:00
Xu Cheng
b324d61f35 bin/brew: remove unpin from sudo check list
We only need to check sudo for commands which create files.
2016-01-20 13:55:06 +08:00
Xu Cheng
e3011dfe91 bin/brew: include alias in sudo check 2016-01-20 13:55:06 +08:00
Xu Cheng
e12e1a5d5d bin/brew: introduce odie function 2016-01-20 13:55:06 +08:00
Xu Cheng
3fdf1a623b bin/brew: always use [[ for consistency 2016-01-20 13:55:06 +08:00
Xu Cheng
29c50d2567 bin/brew: remove unnecessary check
HOMEBREW_BASH_COMMAND variable will always exist. So we only need to
check whether the corresponding file exist or not.
2016-01-20 13:55:06 +08:00
Xu Cheng
f9b33e26e0 brew: remove duplicated logic
This is now handled by `bin/brew`
2016-01-20 13:55:06 +08:00
Xu Cheng
6b5b8757bf bin/brew: fix incorrect argument manipulation
Shifting `-v` argument is all we need to do. We shouldn't enumerate
arguments.
2016-01-20 13:55:06 +08:00
Baptiste Fontaine
92a71a534f os/mac: use start_with? when possible
Closes Homebrew/homebrew#48071.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-19 14:00:01 +01:00
Dominyk Tiller
7faae5adf2 keg: mkpath on lua shares
Closes Homebrew/homebrew#48134.
2016-01-19 12:54:00 +00:00
Mike McQuaid
84a85b97ff Revert "formula_installed: tweak source build behaviour."
This reverts commit 5dd200c6b40f4fa9cc3a70cbc9ca2885e4626943.

Closes Homebrew/homebrew#47889.
2016-01-19 10:16:59 +00:00
Baptiste Fontaine
44a264376b tests: rm the coverage cache before each run
Closes Homebrew/homebrew#48209.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-19 00:28:41 +01:00
Misty De Meo
89c63279d4 Remove cleanup --force from bash completion 2016-01-18 10:15:01 -08:00
Misty De Meo
d1440e504e Update manpage to remove cleanup --force 2016-01-18 10:14:56 -08:00
Misty De Meo
09ba000be1 Permit cleanup to remove outdated keg-only formulae
This check is not really relevant anymore; old-style, pre-opt installs
date from 2012 at the very latest, so it is very unlikely that any
packages remain which still link against these.

Refs Homebrew/homebrew#48139.
2016-01-18 10:10:09 -08:00
Mike McQuaid
b118539c8c bin/brew: use a function to avoid issues.
Otherwise when `bin/brew` is updated in-place Bash will carry on from
the offset and this can cause issues.

Thanks to `@UniqMartin` for pointing this out.
2016-01-18 09:37:46 +00:00
Mike McQuaid
5b7dd99e99 Revert "Revert "dependency: don't recurse infinitely.""
This reverts commit fa43883dd1cd82f234b79c4a322339f03b9c098d.

Closes Homebrew/homebrew#48187.
2016-01-18 08:59:52 +00:00
John Zeringue
a600262f68 formula: output recommended/optional deps in JSON.
Fixes Homebrew/homebrew#47914 by distinguishing between required, optional, and
recommended dependencies when using `brew info --json=v1`. This is done
by adding the `optional_dependencies` and `recommended_dependencies`
fields to the JSON output.

A good example of this fix is `brew info --json=v1 dtrx`.

Closes Homebrew/homebrew#48196.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-18 08:45:58 +00:00
Josh Bode
b6729191fa diagnostic: update check for findutils.
Check for non-prefixed findutils in path via gnubin symlinks or directly

Closes Homebrew/homebrew#46987.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-18 08:44:47 +00:00
Grant Hutchins
624ca35f42 diagnostic: note El Capitan upgrade permissions.
On all of the machines I have upgraded to OS X El Capitan, my /usr/local
directory has changed ownership. Since this message shows up as an error
during `brew update`, I figured it would be good to beef up the
explanation.

Closes Homebrew/homebrew#44670.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-17 21:57:44 +00:00
Tommy Sparber
d675fa0b5a Search also in Caskroom/versions Tap
Extending the current search functionallity to search in
https://github.com/caskroom/homebrew-versions

Closes Homebrew/homebrew#47954.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-17 21:53:20 +00:00
Misty De Meo
066dd63a87 test_edit: HOMEBREW_EDITOR takes precedence over EDITOR 2016-01-17 13:07:46 -08:00
Mike McQuaid
cd0366da0d Revert "dependency: don't recurse infinitely."
This reverts commit 16ffbe1a2b2d99da42481dc50f70dbfee4472da6.
2016-01-17 20:55:05 +00:00
Mike McQuaid
20106e4268 dependency: don't recurse infinitely.
If we have a dependency cycle ensure that infinite recursion does not
result by storing state in a stack which we push/pop from for each
level of recursion and verify that we haven’t been through this
dependency already.

Closes Homebrew/homebrew#47933.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-17 20:12:03 +00:00
Mike McQuaid
42681b51f8 formula_installer: build formula options better.
Previously we got all the options based on the build, any inherited
options, any passed options and the tab. We want to make sure that these
then exclude any options that don't exist as, otherwise, passing an
option that doesn't exist (or has been deleted) is enough to stop a
bottle being poured. This was particularly nasty on upgrades where we
deleted options and one left in the tab would stop the bottle being
poured.

Closes Homebrew/homebrew#47891.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-17 20:06:00 +00:00
Mike McQuaid
e7bffe4809 formula_installed: tweak source build behaviour.
Currently `brew install —build-from-source wget` builds all the
dependencies also from source. I can see people wanting to do this when
`HOMEBREW_BUILD_FROM_SOURCE` is set by passing it on the command-line
is mostly just annoying; it means you have to use `—build-bottle` and
deal with the CFLAGS and `post_install` changes if you want to build
from source. Tweak `formula_installer` so this behaviour is more
intuitive.

Closes Homebrew/homebrew#47889.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-17 20:05:32 +00:00
Mike McQuaid
04a9b0022d test_bash: tests to assert Bash syntax is valid.
Closes Homebrew/homebrew#47380.
2016-01-17 19:48:02 +00:00
Mike McQuaid
99234f0256 Add new update-bash command for testing.
This will become the default updater at a later point in the future.
2016-01-17 19:48:02 +00:00
Mike McQuaid
6f91b429ce Move some brew.rb logic to bin/brew. 2016-01-17 19:48:02 +00:00
Mike McQuaid
b01ce41164 bin/brew: allow writing Homebrew commands in Bash. 2016-01-17 19:48:02 +00:00
Mike McQuaid
effca7d9c6 bin/brew: set more HOMEBREW_* env from Bash. 2016-01-17 19:39:41 +00:00
Bob W. Hogg
3e0828c29a Rubocop: upgrade to version 0.36.0
Stop using Style/TrailingComma as it is no longer recognized and start using
Style/TrailingCommaInArguments and Style/TrailingCommaInLiteral instead.

Closes Homebrew/homebrew#48144.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-17 16:26:49 +08:00
Xu Cheng
f92fc98ec0 test-bot: change directory for git rev-parse --verify 2016-01-17 15:06:07 +08:00
Xu Cheng
154d0850e7 audit_revision: only check 10 recent related commits
It helps to reduce overhead.

Closes Homebrew/homebrew#48108.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-17 14:52:15 +08:00
Xu Cheng
80efb92c35 FormulaVersion: support max depth 2016-01-17 14:52:14 +08:00
Xu Cheng
d4c7dedf12 audit: imporve revision check logic
* Check revision decrease against both stable and devel spec.
* Check revision reset only for stable spec if stable spec is available.
2016-01-17 14:52:14 +08:00
Xu Cheng
176f345386 test-bot: prevent formula building from source multiple times
After formula updates its bottle block, remove itself from changed
formulae list. Therefore, if it's requested next time as dependency, it
will be installed from bottle just created.

Closes Homebrew/homebrew#48121.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-17 14:52:09 +08:00
Xu Cheng
cb3379fcfa test-bot: all formula name are canonical now 2016-01-17 14:52:09 +08:00
Xu Cheng
edca96de04 test-bot: always use canonical formula name
Otherwise, we may get incorrect result when preforming set operations on
list of formula names.
2016-01-17 14:52:09 +08:00
Xu Cheng
09a79106d7 Tap: allow invoking formula_file_to_name by Homebrew internally 2016-01-17 14:52:09 +08:00
Xu Cheng
b32d21fea0 test-bot: simplify Test#git 2016-01-17 14:52:09 +08:00
Xu Cheng
b73a6f195a test-bot: remove dead code 2016-01-17 14:52:09 +08:00
Xu Cheng
39eb93e0f5 test-bot: simplify Test#initialize 2016-01-17 14:52:09 +08:00
Baptiste Fontaine
42a4f44c0e tests: bump the min. coverage to 60 2016-01-16 20:25:57 +01:00
Baptiste Fontaine
f41e0a6e64 tests: more integration tests
Closes Homebrew/homebrew#48124.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-16 15:46:01 +01:00
Misty De Meo
0fa731b020 superenv: properly filter gcc-4.2 flags
These weren't being filtered correctly if the compiler was being called
as g++ instead of gcc.

Fixes mistydemeo/tigerbrew#371.
2016-01-15 22:58:50 -04:00
Xu Cheng
4a8632e54d unpack: preserve file attributes like mtime
Closes Homebrew/homebrew#48068.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-15 16:26:04 +08:00