Commit Graph
1563 Commits
Author SHA1 Message Date
Jack Nagel 31ccb052d7 tests: setup and teardown cleanups
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-16 23:08:32 -05:00
Mike McQuaid 0492c5084f Allow forcing bottle installation. 2012-04-17 12:46:11 +10:00
Mike McQuaid 14f9840b35 Fix Git installation warnings (again).
We have to install them to lib; anywhere else requires root
access, a non-system perl or patching Git.

Tried just moving them in 9597d5 but that breaks git-svn.
2012-04-16 20:26:06 +10:00
Mike McQuaid 58a8dc3294 Fix Qt installation warnings.
PRL files are necessary in lib so whitelist them.

Debian installs them too:
http://packages.debian.org/squeeze/amd64/libqt4-dev/filelist
2012-04-16 16:46:39 +10:00
Misty De Meo 4d66bf8b99 StandardCompilers: 3.1.4 doesn't have llvm 2012-04-15 17:49:49 -05:00
Maurice Kelly 119f18600b info: handle git:// URLs in origin remote
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>

Closes #11670.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-15 14:41:41 -05:00
Jack Nagel 2289f98003 tests: reorganize compiler selection tests
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-14 15:27:45 -05:00
Mike McQuaid a1abd11084 Add ofail command to print error and exit. 2012-04-14 17:48:34 +10:00
Jack Nagel e399fd70a1 tests: bring brew update tests up to date
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-14 00:00:04 -05:00
Jack Nagel 8e38d050cf tests: remove special-casing @path in TestBall
Tests that expect Formula#path to resolve to a real path should use
TestBallWithRealPath; TestBall gets its original behavior back, fixing a
failing test in test_formula_install.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-14 00:00:04 -05:00
Misty De Meo 802616b437 Fix StandardCompilers check
* Return true if Xcode version is not in hash, not nil
* Use two-digit version numbers for 4.0, 4.2, 4.3
2012-04-11 21:45:43 -05:00
Adam Vandenberg 9d0d45db58 Don't warn about .o files in lib 2012-04-11 19:30:24 -07:00
Jack Nagel e3c0a504f2 deps: fix --tree for new deps
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-11 18:24:46 -05:00
Jack Nagel 5545348a33 Implement <=> for Dependency
Fixes #11587.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-11 18:24:24 -05:00
Misty De Meo 7b1ad6e799 brew doctor: add check for outdated compilers
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.

Closes #11518.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-04-11 10:08:46 -05:00
Jack Nagel b7a4bc644a ARGV: use include? for --HEAD
ARGV.build_head? will return true if the typo '-HEAD' is passed because
it uses flag? to detect the option. However, we only filter the exact
spelling of '--HEAD' in ARGV.filter_for_dependencies, and thus the HEAD
property is undesirably passed to deps during installation.

Since we never advertised '-H' as a valid short option for '--HEAD',
just use include? instead of flag?.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-10 21:53:01 -05:00
Jack Nagel cce350691c tests: fix no-op fails_with test
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-09 17:45:35 -05:00
Misty De Meo 31f582a29e doctor: be specific about libiconv files detected
Closes #11417.
2012-04-09 13:19:42 -05:00
Misty De Meo 31394247e4 make_relative_symlink: give more specific advice 2012-04-09 10:09:19 -05:00
Misty De Meo da51cc5321 doctor: skip Cellar checks if Cellar doesn't exist
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. 0d28bc78d7

Fixes #5188 (again).
2012-04-08 15:50:16 -05:00
Jack Nagel 89899c2345 Clean up fails_with test classes
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-07 13:29:40 -05:00
Jack Nagel ddfbaab578 info: output correct URL for tapped dupes
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>
2012-04-06 23:54:41 -05:00
Jack Nagel 21075711b7 tests: silence mirror test
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06 22:06:05 -05:00
Jack Nagel 9d121d7ee4 Fix protection against overriding Formula#brew
The test for this previously passed, but only because the constructor
for SoftwareSpecification was raising an exception. method_added needs
to be a class method because methods are being defined on the class, not
the object, and to test it properly we have to eval the class in the
test itself.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06 17:32:43 -05:00
Jack Nagel 28a2dfd8b6 Add test for ghc version style
the ghc formula had an explicit version because we had trouble parsing
the version from the 64-bit URL. It is working now, so add a test to
ensure it isn't broken in the future.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06 00:08:23 -05:00
Max Howell 4f16573afa Use GitHub API 3 in brew search 2012-04-05 13:06:36 -04:00
Charlie Sharpsteen 09c2a69f89 patches.rb: Fix warning thrown by Ruby 1.8.6
Need to be consistent with use of parenthesis in functions.
2012-04-04 08:28:15 -07:00
Mike McQuaid 137bb03389 Populate empty mirror_list for bottles.
Fixes #11434.
2012-04-04 20:50:22 +10:00
Mike McQuaid 4864b1ba17 Use current bottle versions to calculate new ones. 2012-04-04 15:44:51 +10:00
Rory O’Kane f00c90b552 doctor: fix typos
Closes #11418.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-03 16:21:01 -05:00
Jack Nagel f66238ba13 fetch: don't display cached location twice
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>
2012-04-02 21:04:30 -05:00
Mike McQuaid e827884e04 Version bottles. 2012-04-03 11:43:41 +10:00
Jack Nagel dae8631c4f Reset compiler when testing fails_with
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-01 14:56:04 -05:00
Jack Nagel b36f59dd3c New fails_with infrastructure
- Formulae can now declare failures on any compiler.
 - FailsWithLLVM and associated formula elements have been moved to
   compat.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-01 12:39:59 -05:00
Adam Vandenberg ef416878d5 Show target path when empty 2012-03-30 23:02:43 -07:00
Adam Vandenberg 423a8c34fe install: warn when passed no files
Rationale: we warn when inreplace makes no changes; this is a similar
sort of warning. We expected some list (probably via Dir) to include
some files, but none were found.

Either the list was wrong, or the install can now be omitted.
2012-03-30 22:36:45 -07:00
Jack Nagel c7d9a09a96 info: always indicate if a keg is linked
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.

Fixes #11300.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-29 21:30:13 -05:00
Mike McQuaid 48a82e5f02 Exit with bad exit code on command failures. 2012-03-29 18:44:37 +11:00
Mike McQuaid c6d37fb237 brew-bottle doesn't need to specify filenames now. 2012-03-29 18:41:47 +11:00
Diego Plentz 0dd5ad5360 typo
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-03-28 20:02:07 -07:00
Max Howell fe76848a7d Fix brew unlink
Whoops.
2012-03-25 13:09:30 +01:00
Max Howell f372dafd98 Speed-up brew-unlink under certain conditions
This massively speeds up upgrades for certain formula, ie. formula with lots of files that aren't in the directories we link. I found upgrading android took ages before the un-tar step and it was indeed for this reason.
2012-03-25 11:07:30 +01:00
Max Howell 130131524b Search Homebrew/games 2012-03-25 11:06:28 +01:00
Jack Nagel c4b547a861 Fix typo in --config.rb
Closes #11183.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-24 12:11:37 -05:00
Jack Nagel ba85e7563e Parse raw diff output in brew update
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>
2012-03-23 20:39:24 -05:00
Jack Nagel f8fefcc51e Pass the tab to FormulaInstaller
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.

Fixes #11086.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-23 13:05:08 -05:00
Jack Nagel 40599c3ed5 Detect and display renames in brew update
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.

Closes #11158.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-22 22:15:57 -05:00
Jack Nagel a58497368b Use --verify when querying HEAD
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-22 22:15:57 -05:00
Max Howell 131e19a019 Check tapped before trying to untap
If the tap-formula wasn't symlinked for some reason, don't throw an exception—the job is already done.
2012-03-23 00:16:08 +00:00
Mike McQuaid 5a5462f624 Bottles currently require 64-bit hardware on 10.6. 2012-03-23 09:24:56 +13:00