2303 Commits

Author SHA1 Message Date
Baptiste Fontaine
a2e2553bd8 audit: flag any desc that starts with the formula name
The previous version didn’t work with descs like:

  "TheFormula serves a web page"
2015-10-30 17:56:55 +01:00
Baptiste Fontaine
2ef51381c9 create: deprecate --macports and --fink
Closes Homebrew/homebrew#45465.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-30 10:11:04 +01:00
Baptiste Fontaine
18bda1c9b1 audit: uniformize the desc problems
Closes Homebrew/homebrew#45492.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-30 09:59:43 +01:00
Baptiste Fontaine
a5f6295b62 audit: flag descs starting with the formula name
Closes Homebrew/homebrew#45493.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-30 09:51:20 +01:00
Ben White
f7e649831d doctor: Fix typo in uncommitted modifications warning message
Closes Homebrew/homebrew#45443.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-29 13:34:36 +01:00
Baptiste Fontaine
75c196c1fc create: accept HEAD urls
Fixes Homebrew/homebrew#45310.

Closes Homebrew/homebrew#45336.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-28 14:04:53 +01:00
Mike McQuaid
74e407dc54 The Formula API is no longer work-in-progress.
Feature it a bit more prominently in the documentation as a result.

Closes Homebrew/homebrew#45374.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-27 10:45:23 -06:00
Mike McQuaid
8ea9903a99 update: use git stash silently.
There's been a few issues where users have been confused about these
errors. They may have modified stuff but we probably don't care about
telling them that unless we're debugging other issues.

Closes Homebrew/homebrew#45373.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-27 10:45:23 -06:00
Dominyk Tiller
82f5660752 cat: raise unless object is formulae
Until a point in time when the Cask/Homebrew codebases are harmonised a little
more it probably makes sense to refuse to `cat` Casks. Right now the Homebrew
codebase is only minimally aware of what a Cask is.

Fixes Homebrew/homebrew#45300.
Fixes Homebrew/homebrew#44630.

Closes Homebrew/homebrew#45302.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-10-26 14:06:51 +00:00
Xu Cheng
1248294c8c commands: ensure internal commands are files
`Pathname#children(with_directory = false)` doesn't filter directories,
instead it returns path with basename.

Closes Homebrew/homebrew#45325.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-26 16:11:18 +08:00
Dominyk Tiller
2b9561b837 audit: add bottle modifier checks
* Checks for placement of the bottle modifier variable.

* Checks there isn't a bottle modifier and a bottle do block - The former makes
the latter redundant.

Closes Homebrew/homebrew#45146.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-10-24 00:25:46 +01:00
Baptiste Fontaine
e7ef3e36e2 audit: merge the template comments checks
Closes Homebrew/homebrew#45263.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-23 15:20:10 +02:00
Baptiste Fontaine
774a508d1a audit: warn about unknown bottle modifiers
This prevents typos like `bottle :uneeded` or `bottle :disable`

Closes Homebrew/homebrew#45264.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-23 19:44:19 +08:00
Martin Afanasjew
30cad0608f os: centralize check for pre-release OS X versions
Provide `OS::Mac.prerelease?` for pre-release checks and use it where
appropriate. This should simplify updating the test once a new OS X
release lands.

This also fixes a bug in `BuildError#dump`, where an empty warning
message was printed on El Capitan after a failed from-source build,
because the check there and the one in `check_for_unsupported_osx` were
out of sync.

Closes Homebrew/homebrew#45257.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-23 12:34:44 +01:00
Mike McQuaid
09516e1613 test-bot: fix testing builds building everything.
We don't care about the formulae that have changed since the last commit
so just ignore it.
2015-10-20 12:29:28 +01:00
Martin Afanasjew
fdd3469fca linkapps: stop linking .app bundles from 'bin/'
`Keg#app_installed?` only checks the formula prefix and `libexec/` for
.app bundles to determine if a formula provides any. This is used by
`Caveats#app_caveats` to generate an appropriate message. The same list
should be used by `brew linkapps` for consistency.

Reduce likelihood of future inconsistencies by creating `Keg#apps` and
using it in place of the duplicate code.

Closes Homebrew/homebrew#45173.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-20 18:25:28 +08:00
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
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
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
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
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
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
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
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
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
51a585e0b4 search: don't fail because broken formulae
Fixes Homebrew/homebrew#44687.

Closes Homebrew/homebrew#44770.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-10 01:33:44 +08:00
Xu Cheng
1ae44d4429 use directory? to check rack existence 2015-10-09 19:06:08 +08:00
Xu Cheng
ee332c4550 handle TapFormulaWithOldnameAmbiguityError
Closes Homebrew/homebrew#44705.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-08 16:02:33 +08:00
Daniel Lee Harple
6b3b398858 audit: fix GitHub repository audit
In the data returned from the GitHub API, “watchers_count” is actually the
number of stars.

See https://developer.github.com/v3/activity/starring/#starring-vs-watching

Closes Homebrew/homebrew#44477.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-07 19:48:24 +08:00