8818 Commits

Author SHA1 Message Date
Mike McQuaid
b05a596d57 tap: --config unsupported on old Gits. 2016-06-20 13:03:27 +01:00
Steven Peters
f693774323 test-bot: check for conflicts in dependencies (#379) 2016-06-20 08:53:56 +01:00
Martin Afanasjew
806cfeee18 linkage: simplify display logic
Move check for emptiness into the display method, avoiding repetitive
checks on the call site.

Closes #381.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-06-19 23:53:25 +02:00
Martin Afanasjew
e65d8e17e7 linkage: fix code style issues 2016-06-19 23:53:25 +02:00
Martin Afanasjew
7812b500b8 linkage: avoid checking symlinks/directories
Prevent raising an error when `HOMEBREW_RUBY_MACHO=1` is set. Skipping
symlinks and directories while iterating over a directory structure to
find Mach-O binaries makes sense and similar logic is applied elsewhere.
2016-06-19 23:53:25 +02:00
Baptiste Fontaine
af94c4fc50 pull: skip non-ruby files when collecting formulae names
Closes #377.

Signed-off-by: Baptiste Fontaine <b@ptistefontaine.fr>
2016-06-19 23:35:16 +02:00
Andrea Kao
cad85754cf tests: add cmd/search integration test (#356) 2016-06-19 22:20:20 +01:00
Martin Afanasjew
5954877962 diagnostic: use 'Utils.git_version', simplify code
Prefer `Utils.git_version` instead of duplicating version detection
logic. Decouple unnecessary conflated availability and version checks.

Closes #351.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-06-19 22:12:34 +02:00
Martin Afanasjew
d7b6e9bba9 config: expose used Git version and path
Due to our SCM wrapper in `Library/ENV/scm/git`, lookup is a bit more
complicated than just picking the first match in `PATH`. Make debugging
easier by printing the version and path of the Git actually used by us.
2016-06-19 22:12:34 +02:00
Martin Afanasjew
324a34d8ea utils/git: provide git_path and git_version 2016-06-19 22:12:34 +02:00
Martin Afanasjew
a8165b6dbd scm/git: allow introspecting path lookup
Print path of first detected Git instead of executing it. This is hidden
behind a `--homebrew=print-path` argument that is unlikely to conflict
with any existing or future Git flags.
2016-06-19 22:12:34 +02:00
ilovezfs
96cbce015e bump-formula-pr: remove formula revision
If we're bumping the formula's stable version, then we also must reset
the formula revision to zero.

Note that if and only if a revision is being removed, this commit will
enforce the convention that there should be a blank line before a simple
head spec if and only if there is a formula revision. Any preexisting
violation of the convention (in particular, a blank line before a simple
head spec in the absence of a formula revision) won't be proactively
corrected since we'd not be removing a formula revision in that case.

Closes #369.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-17 08:55:13 -07:00
ilovezfs
cc0ca73183 bump-formula-pr: reflect new version in dry-run
- simulate version change for dry-run
- make sure we're using :devel version if called with --devel

Closes #318.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-16 14:25:53 -07:00
msbit
01e8e180a8 ENV: mark gcc-6 as supporting C++11 (#349)
Add SharedEnvExtension#gcc_with_cxx11_support? to centralise the
logic for checking whether a compiler is known to support C++11.

Update logic to accept GCC 4.8 and above (including 6). Thereby also
address oversight in #163 where support for GCC 6 was added without
updating the C++11 compiler whitelist.

Add tests for Superenv#cxx11.

Closes #346.
2016-06-16 14:15:28 +02:00
Mike McQuaid
62dd4b14ba update.sh: quieten checkout. 2016-06-16 10:57:46 +01:00
Dominyk Tiller
cc10c632a8
macOS Sierra: add pkg-config files 2016-06-14 22:02:40 +01:00
Mike McQuaid
fd0a81399b diagnostic: prod unsupported OS users to file PRs. (#365)
They may not but it's nice to be a bit more explicit.
2016-06-14 21:23:56 +01:00
Xu Cheng
79345592a9
man: auto detect maintainers list 2016-06-14 21:22:07 +08:00
Martin Afanasjew
7727c7764c hardware: prettify config output on 6/8-core CPUs (#313) 2016-06-14 15:08:04 +02:00
Martin Afanasjew
8a70b000e5 tests: fix problems in 'log with formula' test (#350)
Problems fixed:

- Broken and leaking test if run as part of `brew tests --coverage` due
  to the `cmd` call being nested in the `Pathname#cd` block.
- Output during `git clone` operation because of a missing `shutup do`.
- Still incomplete coverage for `cmd/log.rb` because `brew log` is
  invoked on the formula in the origin instead of the shallow clone.
- Minor stylistic fixes:
  - Superfluous parentheses around `core_tap.path.dirname`.
  - Overly long lines.
2016-06-14 14:58:11 +02:00
Martin Afanasjew
86538c9d6a tests: simplify SimpleCov configuration (#348)
There is no good reason to configure the options specific to integration
tests in a completely different location from all other options.
2016-06-14 14:54:16 +02:00
Martin Afanasjew
92f51abf59 tests: avoid compat code in --no-compat mode (#347)
Simply drop because the `require`s are not actually used by the tests
and no file from `compat/` should be loaded unconditionally. (This can
otherwise lead to incorrect results for `brew tests --no-compat`.)
2016-06-14 14:53:43 +02:00
Dominyk Tiller
01b514f57a
tests: add test bottle for Sierra
Fixes:

```
  1) Error:
FormularyFactoryTest#test_factory_from_bottle:
Errno::ENOENT: No such file or directory - /usr/local/Library/Homebrew/test/bottles/testball_bottle-0.1.sierra.bottle.tar.gz
    /usr/local/Library/Homebrew/formulary.rb:98:in `realpath'
    /usr/local/Library/Homebrew/formulary.rb:98:in `realpath'
    /usr/local/Library/Homebrew/formulary.rb:98:in `initialize'
    /usr/local/Library/Homebrew/formulary.rb:274:in `new'
    /usr/local/Library/Homebrew/formulary.rb:274:in `loader_for'
    /usr/local/Library/Homebrew/formulary.rb:215:in `factory'
    /usr/local/Library/Homebrew/test/test_formulary.rb:79:in `test_factory_from_bottle'
```

Closes #358.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-06-14 02:58:15 +01:00
Dominyk Tiller
425eedf43e
xcode: expect 8.0 on macOS 10.12
Closes #357.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-06-14 02:58:08 +01:00
Dominyk Tiller
7183a72105
mac: recognise Clang 800 2016-06-14 02:58:07 +01:00
Mike McQuaid
1c46db9a73 os/mac/version: add macOS Sierra. (#353) 2016-06-13 19:20:00 +01:00
Andrew Janke
e9cdfb989e test-bot: strip additional invalid XML chars under Ruby 1.8.7 (#341) 2016-06-13 08:01:08 -04:00
Mike McQuaid
e1f0dec41e update.sh: developers always run update-report.
As they may use e.g. `git pull` which may result in them having formulae
that aren't migrated (and they mind less about the slight slowdown).
2016-06-12 18:28:08 +02:00
Andrea Kao
3f7fffe17d tests: extend cmd/log integration test (#333) 2016-06-12 13:50:34 +01:00
Elliot Saba
e9cc2a5d88 Add "build_dependencies" key to JSON output (#340)
This gives the JSON output the same type of information as
`recommended_dependencies` or `optional_dependencies`, but for those
marked `:build` in the formula.
2016-06-12 02:03:08 +02:00
ilovezfs
6367508454 deps should respect skip-recommended
For example, `brew deps libass --skip-recommended` shouldn't print
harfbuzz because, even though libass builds with harfbuzz when harfbuzz
is not skipped, we asked to skip recommended, of which harfbuzz is one.

The corresponding change is made for `brew uses` as well.

Thanks to Xu Cheng for contributing the code. Any errors are mine.

Closes #129.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-11 01:26:28 -07:00
ilovezfs
11d47e8325 boneyard-formula-pr: add new command.
Add a new developer command (i.e., requires `HOMEBREW_DEVELOPER` set in
your environment) to "boneyard" a formula, by creating one pull request
removing the formula from its current tap and updating (or creating)
tap_migrations.json, and another pull request importing the formula into
homebrew/boneyard with any bottle block removed.

Closes #53.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-08 13:19:30 -07:00
Tony Kelman
fe89467832 exceptions: Remove duplicate "a" in "must be built from source" error (#339)
otherwise would get "cannot be installed as a a binary package"
since `package_text` contains "a binary package" in the singular case
2016-06-08 17:53:11 +02:00
Elliot Saba
2ca6dbbe9d brew.rb: Don't ask xcrun for output if no CLT is installed (#334)
This avoids `xcrun` popups when installing Homebrew on a non-Xcode
non-CLT machine.
2016-06-08 14:53:10 +02:00
Xu Cheng
8d64b6a02d introduce global lock directory (#337)
Since #292, HOMEBREW_CACHE was moved to a per-user directory. This makes
it unsuitable to store global lock files on multiple users environment.

Therefore, introducing a global lock directory `/Library/Lock.d` to
store lock files from formula lockers as well as `brew update`.
2016-06-08 17:29:03 +08:00
ilovezfs
21ca138edf Resource.unpack: install invisible files and dirs
Since patches sometimes change .gitignore and .travis.yml, it's
desirable to install them along with everything else if a resource needs
patching. Also, for resources that are git respositories, this allows
install to interact with git objects other than the commit specifically
checked out. More generally, this may help to avoid subtle issues by
preserving the fidelity of resources in cases where invisible dot files
play a functional role.

Closes #329.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-07 12:16:43 -07:00
Martin Afanasjew
af42deca4a audit: detect more 'pkgshare' candidates (#328)
The new check also allows the `+` operator instead of our (still heavily
preferred) `/` operator for path concatenation and also triggers if the
operator is surrounded by whitespace.

Also recognizes single-quoted strings and uses a back reference to
match the closing quote for a slightly lower chance of false positives.

Closes #322.
2016-06-07 17:46:40 +02:00
ilovezfs
2cd81e5051 update: pop the stash more quietly
git stash pop -q will print "Already up-to-date!" if untracked changes
are being poppped. This quiets it down unless verbose is set.

Closes #320.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-05 07:55:35 -07:00
Mike McQuaid
14657443ce gist-logs: fix new-issue URL. 2016-06-05 12:40:26 +01:00
Martin Afanasjew
25baaa61ac formula_support: don't fail without CLT/Xcode
`Formula#keg_only?` could fail if it was invoked on a formula with a
`:provided_until_xcode43` or `:provided_until_xcode5` reason given to
`keg_only`, if neither the Command Line Tools nor Xcode was installed.
Check whether Xcode is installed before querying the Xcode version.

Closes #317.
2016-06-05 12:49:38 +02:00
Martin Afanasjew
656c713d6c bottle: use short formula name in bottle commit 2016-06-03 17:04:07 +02:00
Mike McQuaid
822b05c9c1 cmd/pull: fix HTTP header usage. 2016-06-03 15:32:11 +01:00
Mike McQuaid
8a217dd420 update: tweak stash/checkout behavior. (#312)
Always pop stashed changes for Homebrew developers and only checkout
original branches for them (to avoid users who don't understand Git
ending up "stuck" on branches).
2016-06-03 14:12:36 +01:00
Mike McQuaid
5e272257d2 download_strategy: add missing "time" require.
Closes https://github.com/Homebrew/homebrew-core/issues/1687.
2016-06-03 13:46:18 +01:00
Andrea Kao
5ac6eb434e tests: extend cmd/desc integration test (#314) 2016-06-03 13:10:38 +01:00
Mike McQuaid
8e0e1642ad Use curl for the GitHub API (#295)
* Move GitHub API module to utils/github.rb.

* Move curl method to utils/curl.rb.

* global: use long curl arguments and an array.

This makes the code more self-documenting.

* utils/curl: support reading curl's output.

* utils/github: use curl instead of open-uri.

It has far better proxy support.

* pull: set Homebrew user agent.

* gist-logs: remove trailing whitespace.

* gist-logs: use first instead of [0].

Easier to read.

* gist-logs: use curl-based GitHub.open method.
2016-06-03 13:05:18 +01:00
ilovezfs
b2c9625d78 formula_installer: accumulate inherited options
When a given dependency appears multiple times in a formula's dependency
tree, the inherited options for that dependency should accumulate rather
than being overwritten each time that dependency is considered by
expand_dependencies. In particular, this impacts "universal" since the
dependency should be built with universal unless all of its instances in
the dependency tree don't have "universal" as opposed to only if the last
instance considered has "universal."

Closes Homebrew/homebrew-core#1604.

Closes #308.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-02 02:19:58 -07:00
Martin Afanasjew
d2cdbcbb18 tests: add missing require
Amends e4d0187120e61bc80d31ebecc3b38f0740b20bb5. The `require` was
accidentally omitted causing the tests to fail very sporadically (or
always, when invoked as `brew tests --only=integration_cmds`).
2016-06-02 09:36:51 +02:00
Martin Afanasjew
1c00fed119 audit: check Maven Central URLs, prefer redirector (#311)
Should help with being more consistent and makes sure to suggest the
HTTPS redirector even if equally valid HTTP URLs for specific hosts or
`central.maven.org` are used.
2016-06-02 09:36:27 +02:00
Andrea Kao
e4d0187120 tests: extend cmd/home integration test (#305) 2016-06-02 01:26:32 +02:00