Commit Graph
340 Commits
Author SHA1 Message Date
Jack Nagel 11c9eca76b Always prune empty toplevel directories when unlinking
Closes #21750.
2013-08-09 20:55:54 -05:00
Jack Nagel 102f760f9a Keep track of pruned parent directories 2013-08-09 20:50:43 -05:00
Jack Nagel 16f134c14f Add tests to demonstrate failure to prune empty directories 2013-08-09 20:50:43 -05:00
Jack Nagel 2ae78fd9a2 Remove hardcoded paths in keg tests 2013-08-09 20:50:42 -05:00
Jack Nagel a4cc482162 Remove keg test dependency on formula 2013-08-09 20:50:42 -05:00
Mike McQuaid 5bbe98f3a1 bottle_versions: add ssh_copy_id bottle detection. 2013-08-03 22:27:42 -07:00
Mike McQuaid 36dcc6ba02 bottle_versions: add perforce bottle detection. 2013-08-03 22:27:42 -07:00
Mike McQuaid ee972d943b bottles: use dedicated version class. 2013-08-03 22:27:42 -07:00
Mike McQuaid b9b5ff7719 versions: remove perforce bottle detection. 2013-08-03 22:27:42 -07:00
Jack Nagel 8325c1b8c6 RbConfig::CONFIG['bindir'] is already a string 2013-07-28 16:43:22 -05:00
Jack Nagel f915beb966 Adjust logic to properly sort erlang versions
Fixes #21417.
2013-07-24 19:48:21 -05:00
Jack Nagel f4aa7de35d Check deps of satisfied deps 2013-07-22 21:36:11 -05:00
Jack Nagel cc5ad63609 Silence warnings 2013-07-22 11:41:47 -05:00
Jack Nagel 32398b36b6 Remove duplication in updater tests 2013-07-09 22:12:08 -05:00
phinze 90e3fd0f43 Properly define tapped formulae in update
A tapped formula is a ruby file present:

  - in the root of the tap
  - in directory of the tap called Formula
  - in a directory of the tap called HomebrewFormula

And nowhere else. This corrects an overzealous definition of tapped
formula in the updater. (the correct definition has been in Pathname
since e613cbe578)

Refs #19743.
Closes #21087.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-07-09 20:52:51 -05:00
Misty De Meo 156ce4d4d5 Add Haswell to CPU tests
These tests need a lot of work...
2013-07-01 01:06:44 -05:00
Victor Martinez 4392eba160 Fixed several broken sourceforge.net download locations
Closes #20645.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-06-30 12:17:57 -07:00
Jack Nagel ce6763a4c5 Reject versions that aren't strings 2013-06-28 21:18:04 -05:00
Jack Nagel a16c80add0 Detect versions in tag specs
Closes #18300.
Closes #20891.
2013-06-28 21:17:23 -05:00
Jack Nagel bc80b3d190 Fix some #eql? correctness issues
The implementation of #eql? and #hash should ensure that if a.eql?(b),
then a.hash == b.hash, but #eql? itself should not *depend* on #hash.

For example, given

  class Thingy
    def eql?
      instance_of?(other.class) && hash == other.hash
    end

    def hash
      [name, *tags].hash
    end
  end

if #hash produces a collision for different values of [name, *tags], two
Thingy objects will appear to be eql?, even though this is not the case.
Instead, #eql? should depend on the equality of name and tags directly.
2013-06-27 01:18:45 -05:00
Jack Nagel ce0b989c63 Add syntax sugar for MPIDependency
Closes #20797.
2013-06-26 22:18:13 -05:00
Adam Vandenberg b2df2f7292 Skip test on Xcode only systems 2013-06-26 09:45:32 -07:00
Jack Nagel 957b32b1f2 Uniqify tags when merging dependencies 2013-06-25 10:12:14 -05:00
Jack Nagel 8de8030009 Requirement: callers are responsible for invoking #satisfied?
This hack was necessary since requirements were not checked again
in the forked build process, but now they are, and calling it again
after the build environment has been set up can produce incorrect
results. In fact, if it happens to return false the second time,
the env modification will be skipped altogether.
2013-06-24 10:42:43 -05:00
Jack Nagel 1c017129db Actually make the assertion we care about 2013-06-24 08:52:41 -05:00
Jack Nagel f07633de41 Copy env_proc when merging deps 2013-06-24 08:52:41 -05:00
Jack Nagel c7c8d6c02d Use OkJson directly 2013-06-22 21:34:03 -05:00
Jack Nagel 163067512b Add Utils::JSON to wrap the JSON implementation 2013-06-22 21:34:02 -05:00
Jack Nagel 386fbe33ea Homebrew has an actual license, remove stale comment 2013-06-22 15:01:59 -05:00
Mike McQuaid 59798de617 Don't use cats in bottle tag tests (thanks 10.9). 2013-06-22 11:13:59 +01:00
Mike McQuaid 4e9c357733 perforce: add version detection regex. 2013-06-20 13:07:59 +01:00
Jack Nagel faa35b4fcd Avoid unnecessary float to string conversion 2013-06-15 10:13:20 -05:00
Jack Nagel 55a122ea0c Run tests under actual OS version 2013-06-14 19:19:26 -05:00
Jack Nagel e17d2a24fc Use Hardware::CPU module 2013-06-14 10:34:17 -05:00
Jack Nagel 5f032942ed Remove unused variable 2013-06-12 17:25:29 -05:00
Jack Nagel 2bba5c3f07 Check method existence rather than Ruby version 2013-06-11 17:05:44 -05:00
Jack Nagel fa582cb9ac Add failing test for a misdetected version 2013-06-10 14:55:23 -05:00
Misty De Meo 30c79ab65b Add :ld64 dependency
This allows formulae which won't build with Tiger's ld to conditionally
request a dependency on the ld64 formula. This modifies the build
environment appropriately, and will only be active on Tiger.
2013-06-08 19:10:38 -05:00
Jack Nagel e660d7bdd8 Merge repeated deps with differing options
When expanding dependencies, repeated deps are treated as equal and all
but the first are discarded when #uniq is called on the resulting array.
However, they may have different sets of options attached, so we cannot
assume they are the same.

After the initial expansion, we group them by name and then create a new
Dependency object for each name, merging the options from each group.

Fixes #20335.
2013-06-08 12:23:15 -05:00
Jack Nagel a41d7942a0 Add Enumerable#group_by 2013-06-08 12:23:14 -05:00
Jack Nagel d74c024000 test_dependency_expansion: dep names should always be strings 2013-06-07 21:54:27 -05:00
Jack Nagel 99c976e8cb Fix failing test 2013-06-07 20:57:07 -05:00
Jack Nagel f155d31943 Decouple bottle tags from MacOS.cat 2013-06-06 16:02:27 -05:00
Jack Nagel 3f3c5ae976 Improve tokenization of version strings
Tokens like "b4", "beta1", "p195", &c. are now treated as atoms rather
than being broken down even further. Additionally, we enable support for
padding in the middle of versions strings, so we can successfully
compare something like "2.1-p195" with "2.1.0-p194" by inferring that
"2.1" is really "2.1.0".

This fixes the comparison "9.9.3-P1" > "9.9.3" which previously has not
been handled correctly.
2013-06-05 22:03:58 -05:00
Jack Nagel b262a009ba Add failing test for patchlevel version comparisons 2013-06-05 10:06:37 -05:00
Jack Nagel 0759cce3c2 Extract attr_rw from Formula for reuse
Closes #20239.
2013-06-04 11:06:18 -05:00
Jack Nagel b2972dc1f9 Allow explicit conversion of requirements to deps
Fixes #19857.
2013-06-03 16:52:00 -05:00
Jack Nagel 9dc4c326bf Remove empty test file
This breaks my test runner in weird ways.
2013-06-03 15:05:00 -05:00
Samuel John 0b50110107 Python 2.x and 3.x support
New `depends_on :python` Dependency.
New `depends_on :python3` Dependency.

To avoid having multiple formulae with endings -py2 and -py3,
we will handle support for different pythons (2.x vs. 3.x)
in the same formula.
Further brewed vs. external python will be transparently supported.

The formula also gets a new object `python`, which is false if
no Python is available or the user has disabled it. Otherwise
it is defined and provides several support methods:

python.site_packages # the site-packages in the formula's Cellar
python.global_site_packages
python.binary # the full path to the python binary
python.prefix
python.version
python.version.major
python.version.minor
python.xy # => e.g. "python2.7"
python.incdir # includes of python
python.libdir # the python dylib library
python.pkg_config_path # used internally by brew
python.from_osx?
python.framework?
python.universal?
python.pypy?
python.standard_caveats # Text to set PYTHONPATH for python.from_osx?
python.if3then3 # => "" for 2.x and to "3" for 3.x.

Further, to avoid code duplication, `python` takes an optional
block that is run twice if the formula defines depends_on
:python AND :python3.

python do
  system python, 'setup.py', "--prefix=#{prefix}"
end

Read more in the Homebrew wiki.
2013-06-03 17:29:43 +02:00
Jack Nagel 4635363e2f test_mach: move helper method out of global namespace 2013-06-01 19:40:26 -05:00