Mono installs its own pkg-config symlink into /usr/bin/pkg-config,
which breaks non-Mono builds. Provide a specific warning.
ClosesHomebrew/homebrew#12859.
`brew doctor` shelled to `brew missing` and parsed the results.
When VERBOSE was true, this caused an error as extra, unexpected
output is generated.
Make missing an internal command, and give it a programmatic interface.
We now skip the outdated check if our local origin/master tracking
branch matches the origin remote's current master. This prevents false
positives when we are actually up-to-date but the latest commit is over
24 hours old.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Rationale: some users insist on replacing the /usr/bin/ruby symlink
to point to another ruby on their system, which may break homebrew.
Use the full Framework path instead, which is less likely to be tampered with.
This also reorganizes the brew --config checks to reflect the different path.
FixesHomebrew/homebrew#12009.
ClosesHomebrew/homebrew#12333.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Under certain circumstances, an invalid path element would cause
File.expand_path to bail out. Catch mistakes and report them, then
continue instead.
FixesHomebrew/homebrew#12154
'which' only returns a Pathname or nil, and doesn't care about anything
sent to stderr, so just silence it by default and combine the two
methods.
ClosesHomebrew/homebrew#12115.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The URL being constructed is only able to extract the correct username
when git@ or https:// URLs are found as the origin remote. This change
allows git:// to be used as well.
Signed-off-by: Maurice Kelly <osv-github@chatswood.org.uk>
ClosesHomebrew/homebrew#11670.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
A common source of build problems on Xcode 4.3+ is outdated compilers,
usually when a user has installed over top of an old version and hasn't
installed the CLT. Since the compilers from the previous Xcode are still
around, brew doctor wouldn't complain.
This adds a hash containing a list of the canonical compiler versions
for supported versions of Xcode, and adds a check against that to determine
whether a given installation has any compilers which are out of date.
ClosesHomebrew/homebrew#11518.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Attempting to call certain methods on the Cellar before it exists,
such as realpath, would cause brew doctor to throw unnecessary "file
does not exist" errors. This was fixed once before, but new tests
have been added since without the appropriate checks.
cf. 0d28bc78d71590c8e8a5961d8d10e3d7d9b8822d
FixesHomebrew/homebrew#5188 (again).
Tapped formulae that dupe those in core now display the correct URL when
invoked like `brew info homebrew/dupes/openssl`.
This also fixes the broken `brew info` test.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The download strategy will print the cached location if we've already
fetched it, so avoid printing redundant information.
Also just "puts" it instead of using a second `ohai` line.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
We mark the linked keg with an asterisk when multiple kegs exist, but
not when there is only a single keg. Start marking even in this case,
giving consistent behavior and a reliable indicate of the link status.
FixesHomebrew/homebrew#11300.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Using each_cons() "works", but to report all changes correctly we need
to look at the last elements even after we've looked at the last 3
consecutive elements.
Instead, let's parse each line of the raw diff output using a regexp.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Callers of FormulaInstaller now usually unlink the existing keg prior to
running the installer. However, Tab.for_formula uses the LinkedKeg
record to obtain the tab.
Since we need the tab to persist install options across upgrades, we
must start creating the Tab object before unlinking the old keg and
passing it to the FormulaInstaller.
FixesHomebrew/homebrew#11086.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Renamed formulae will cease to display as an add/delete pair and instead
end up the in the "Renamed" section. In the future we should be able to
take this information and use it to rename existing kegs during updates,
allowing us to rename formulae without breaking upgrades.
Renaming a formula requires renaming the class, so there will be at
least one add/delete pair in the file. Thus, the similarity threshold
for detecting renames is set at 85% to allow a little bit of content
turnover without losing track of the rename.
ClosesHomebrew/homebrew#11158.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>