The new stage() signature introduced by #66 breaks back-compatibility
under Ruby 1.8.7. This fixes it by switching back to a one-argument
block signature and using a new class to wrap both the Resource and
Mktemp info for the staging context, in a signature-back-compatible
way.
Addresses homebrew/homebrew-core#529.
Closes#135.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
Also enables sandbox for --interactive and --debug use of install
and test, using automatic retention.
Closes#66.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
Because the versions are read from directory listings, we get
alphabetical sorts of version numbers in `brew outdated` output:
some-keg (10.1.10, 10.1.11, 10.1.9 < 10.1.12)
This is nicer:
some-keg (10.1.9, 10.1.10, 10.1.11 < 10.1.12)
ClosesHomebrew/homebrew#49534.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Currently HOMEBREW_BREW_FILE is a String, while other of HOMEBREW_*
variables are all Pathname. This commit unifies them all as Pathname,
so it will not cause any confusion.
ClosesHomebrew/homebrew#48872.
Signed-off-by: Xu Cheng <xucheng@me.com>
This check is not really relevant anymore; old-style, pre-opt installs
date from 2012 at the very latest, so it is very unlikely that any
packages remain which still link against these.
Refs Homebrew/homebrew#48139.
FixesHomebrew/homebrew#47914 by distinguishing between required, optional, and
recommended dependencies when using `brew info --json=v1`. This is done
by adding the `optional_dependencies` and `recommended_dependencies`
fields to the JSON output.
A good example of this fix is `brew info --json=v1 dtrx`.
ClosesHomebrew/homebrew#48196.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This was caused by a "race" between two commits.
bash-3.2$ git log -n1 --format=%ai 3344229
2012-08-15 22:08:40 -0500
bash-3.2$ git log -n1 --format=%ci 3344229
2012-09-17 20:01:37 -0500
bash-3.2$ git log -n1 --format=%ai 8837423
2012-08-25 11:31:57 -0700
bash-3.2$ git log -n1 --format=%ci 8837423
2012-08-25 11:52:37 -0700
"built_bottle" was renamed "built_as_bottle" in 8837423 after the date
3344229 was authored but before the date it was committed to master, and
unfortunately in the interim 3344229 hadn't been updated to reflect the
name change.
This commit changes the Formula class's to_hash method to use
tab.built_as_bottle not tab.built_bottle, which doesn't exist. At this
time, there is no way that to_hash could have known that
tab.built_bottle is bogus. Perhaps this could be made safer in the
future, so that non-existent methods cause an error here rather than
just silently returning null.
ClosesHomebrew/homebrew#47912ClosesHomebrew/homebrew#47916.
Signed-off-by: Xu Cheng <xucheng@me.com>
This reverts commit 5896555e5352b5e4f16f583ea444942cd1fc56bd.
It caused header-location issue on dual-developer-tool systems for certain
formulae. Will need looking at again, but we'll probably have to try and
do this a different way.
ClosesHomebrew/homebrew#47668.
CMake has -DNDEBUG and -O3 as its default flags for Release builds.
Homebrew clears out the default CMake flags, which is fine for
optimization because Homebrew passes its own optimization flag(s).
-DNDEBUG wasn't added back in, though.
This ensures -DNDEBUG is passed to CMake release builds by default,
instead of individual formulas having to add it explicitly.
This also removes explicit additions of -DNDEBUG from the formulae that
had them -- gflags, llvm, and taglib.
ClosesHomebrew/homebrew#47378.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
For users whose local brew is at around 2015-06-11 to 2015-08-06,
running `brew update` will emit following error:
Error: uninitialized constant Formulary::CoreFormulaRepository
This is caused by the same bug described in Homebrew/homebrew#42553.
This commit workarounds this issue and restores `brew update` compatibility
for users mentioned above.
Also cleanup legacy `require "cmd/tap"`.
Remove duplication, link to the API documentation more often,
tweak wording, add `@UniqMartin` as a maintainer, note `@jacknagel`'s
and `@adamv`'s significant past contributions to Homebrew, delete some
outdated or unneeded documentation, add some missing `Formula` API.
entries and simplify/improve `CONTRIBUTING.md`.
ClosesHomebrew/homebrew#46179.
ClosesHomebrew/homebrew#46618.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
There are plenty of IO operations inside Tap object, and it will be more
when implementing formula alias reverse look up(e.g. list all of alias
names for a formula). So let's cache them.
Some benchmark:
$ time brew info $(brew ruby -e 'puts Formula.tap_names') > /dev/null
Before: 6.40s user 2.42s system 96% cpu 9.134 total
After: 4.75s user 0.77s system 97% cpu 5.637 total
ClosesHomebrew/homebrew#44377.
Signed-off-by: Xu Cheng <xucheng@me.com>