1648 Commits

Author SHA1 Message Date
Xu Cheng
2df6ad1bed Formula#to_hash: add bottle info
Closes Homebrew/homebrew#43848.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-13 12:59:13 +08:00
Xu Cheng
81bd5c40d0 Formula: add tap alias
Closes Homebrew/homebrew#43851.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-13 12:58:00 +08:00
Alex Dunn
818c65542d remove Formula#file_modified?
It's been more trouble than it's worth.

Fixes Homebrew/homebrew#43607.
Closes Homebrew/homebrew#43049.

Closes Homebrew/homebrew#43615.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-09-06 13:13:59 +01:00
Xu Cheng
faa6334774 Formula#file_modified?: use Utils.git_available? 2015-09-02 15:24:52 +08:00
Mike McQuaid
2c959a7d58 More API documentation.
And remove the documented stuff from the `example-formula.rb`.

Closes Homebrew/homebrew#43241.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-29 15:43:16 +01:00
Xu Cheng
1df6e5d331 Formula#file_modfiled?: remove unnecessary git dir check
It's already covered by `$?.exitstatus == 0` in below.
2015-08-25 17:32:39 +08:00
Dominyk Tiller
b808eed08f formula: use which over locate 2015-08-25 04:18:46 +01:00
Misty De Meo
98bb638f29 Formula#file_modified?: fix for Xcodes without git
Fixes Homebrew/homebrew#43206.
2015-08-24 20:10:53 -07:00
Xu Cheng
09c810c7f4 add link_overwrite DSL
Sometimes we accidentally install files outside prefix. After we fix that,
users will get nasty link conflict error. So we create a whitelist here to
allow overwriting certain files. e.g.
  link_overwrite "bin/foo", "lib/bar"
  link_overwrite "share/man/man1/baz-*"

During FormulaInstaller#link, the whitelist conflict files will be
backup into HOMEBREW_CACHE/Backup
2015-08-23 21:43:03 +08:00
Misty De Meo
727239e12f Merge bottle install without Xcode branch
Merge branch 'bottle_hooks'
2015-08-21 11:04:22 -07:00
William Woodruff
1face808f5 Add guards to calls that would trigger Xcode install requests
add guard in Formula#file_modified? to prevent git popup

add guard in Superenv.bin before calling MacOS::Xcode.version

add guard against missing Xcode/CLT in Xcode.uncached_version

return nil instread of 0 in uncached_version when Xcode/CLT are not present, to distinguish from linuxbrew behavior

checks against pour_bottle? and needs_relocation?, add guard around keg.relocate_install_names to check pour_bottle?/needs_relocation? as well

needs_relocation? becomes skip_relocation?, use cellar attr to indicate relocation instead of does_not_need_relocation

MacOS.can_build? becomes MacOS.has_apple_developer_tools?
2015-08-21 11:02:33 -07:00
Xu Cheng
b6c64ae46a also lock oldname when applied 2015-08-20 15:47:41 +08:00
Baptiste Fontaine
8ba0fb9fcf unnecessary calls to .select simplified
These are minor perf optimizations.

Closes Homebrew/homebrew#43028.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-18 00:18:22 +02:00
Xu Cheng
203cecb463 add Formula.racks
Also exclude symlink when enumerating installed racks.
2015-08-14 15:52:56 +08:00
Vlad Shablinsky
ae9bf4aaaa formula: add oldname method
- add Formula#oldname to get oldname for formula
- add formula_renames.rb to store information about formula renames
2015-08-10 13:57:58 +01:00
Xu Cheng
ae0e270727 favor flat_map over map...flatten 2015-08-06 22:33:46 +08:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Dominique Orban
68a13b240f formula: define opt_pkgshare helper method.
Closes Homebrew/homebrew#42023.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-01 15:12:46 +01:00
Xu Cheng
ac738ae2cd enumerate all formulae by files rather than names
Before
```
$ time brew readall
brew readall  10.63s user 0.36s system 99% cpu 11.003 total
```

After
```
$ time brew readall
brew readall  5.62s user 0.24s system 99% cpu 5.859 total
```

Closes Homebrew/homebrew#42302.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-01 00:49:50 +08:00
Xu Cheng
21eecbf1d6 Formula: add set_acitve_spec method 2015-07-31 19:44:02 +08:00
Xu Cheng
03facd8554 Formula: add any_version_installed? method 2015-07-31 19:44:01 +08:00
Xu Cheng
8f5f27358a Formula#installed_prefix: use PkgVersion
Also check stable_prefix when current acitve_spec is not :stable
2015-07-31 19:44:01 +08:00
Xu Cheng
5aa6b5c5fa Formula#pkg_version: return the result based on current active_spec 2015-07-31 19:44:01 +08:00
Xu Cheng
78442232d0 Formula: add active_spec_sym 2015-07-31 19:44:00 +08:00
Xu Cheng
274f21388e Revert "formula: create empty zshrc when zsh is shell"
This reverts commit be55c800d0bf2750902df71d092906b49b49ffce.
2015-07-29 16:23:10 +08:00
Dominyk Tiller
4625fd335c formula: create empty zshrc when zsh is shell
One minor consequence of our seizing of the HOME variable during builds for
sandboxing purposes is that if you're doing an interactive or git installation
zsh flags up that it hasn't found any config files and throws you into the
`zsh-newuser-install` area.

Not really a problem, just a nuisance.

Since the check is just for existence rather than content, we can work around
this by creating an empty config file when the `SHELL` environmental variable
includes zsh.
2015-07-24 09:01:34 +01:00
Xu Cheng
33befcf312 tests: fix patching test for no-compat mode
Closes Homebrew/homebrew#41977.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-07-22 15:12:31 +08:00
Xu Cheng
744de30089 move deprecated codes into compat
Closes Homebrew/homebrew#41974.
2015-07-21 21:58:10 +08:00
Dominyk Tiller
ac523bac06 formula: always override user home
Closes Homebrew/homebrew#40444.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-07-18 20:48:00 -07:00
Alex Dunn
da2e4d417d fetch/build formula from source when modified
closes Homebrew/homebrew#36068

Closes Homebrew/homebrew#41397.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-07-18 19:30:30 -07:00
Tim D. Smith
10495fb1fa add Formula#pkgshare path
Formalizes the (share/"foo").install idiom.

Closes Homebrew/homebrew#41333.
2015-07-07 17:39:20 -07:00
Xu Cheng
37cd547d5c Formula: cache methods' output to reduce io
Closes Homebrew/homebrew#40855.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-06-21 15:20:37 +08:00
Jack Nagel
44feb5b8f9 Add opt_frameworks helper 2015-06-17 21:31:27 -04:00
Mike McQuaid
1e86730289 Rename requirements named *Dependency.
Dependency is another similar, related class and it's super confusing
to have some Requirements that are named *Dependency.

Closes Homebrew/homebrew#38891.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-06-16 08:12:01 +01:00
Xu Cheng
f2d0a88292 remove Pathname#find_formula
Closes Homebrew/homebrew#40486.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-06-11 15:28:30 +08:00
Xu Cheng
f8efea0cf3 formula#to_hash: record requirements
Closes Homebrew/homebrew#40451.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-06-07 20:32:46 +08:00
Johannes Wienke
de43ac7503 Add support for fish shell completions
* Library/Homebrew/caveats.rb: add caveats comparable to other shells
* Library/Homebrew/formula.rb: define completion directory along the
  conventions explained in the fish documentation for
  $fish_complete_path
* Library/Homebrew/keg.rb: add fish shell to check function for
  installed completions

Closes Homebrew/homebrew#39828.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-06-02 10:09:10 +01:00
Xu Cheng
9a90dbd275 Formula: add full_name variable 2015-05-29 17:01:53 +08:00
Xu Cheng
ec4011a46e Formula#installed: loading using Formulary.from_rack
Also handle TapFormulaAmbiguityError
2015-05-27 13:53:40 +08:00
Xu Cheng
e2b0bca931 add Formula.core_names Formula.tap_names and Formula.full_names 2015-05-27 13:53:40 +08:00
Xu Cheng
3a3a49bd93 add Formulary.core_path method, deprecate Formula.path 2015-05-27 13:53:40 +08:00
Nikolaus Wittenstein
86365470e6 Add a desc field to Formula 2015-05-25 17:23:49 +01:00
Jack Nagel
16dfe3dd40 Add Formula#logs 2015-04-25 23:14:05 -04:00
Mike McQuaid
9cfd768bfe formula: add more API docs for directories.
Closes Homebrew/homebrew#38571.
2015-04-12 21:49:12 -07:00
Dominyk Tiller
a5c4eb2d3e cmake: adjust standard built type
Moves from None to Release, but comments out the standard release
CFLAGS so we can continue using our own.

Bumped Libgit2 as an example/test to play with.

Closes Homebrew/homebrew#37332, hopefully.

Closes Homebrew/homebrew#37361.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-04-09 08:50:51 +01:00
Tim D. Smith
a5e1f698d5 Keep Homebrew site-packages in sys.path during brew test
Formulas that build python things and which are tested with system
Python will encounter test failures unless system Python is configured
to add Homebrew's site-packages to sys.path. This change makes sure that
configuration is performed in the test environment.

Both lines are needed; the first reads and processes .pth files and the
second makes sure that Homebrew's site-packages is read before the
system extras, so that formulas depending on Homebrew/python/numpy get
the Homebrew/python version and not the old system version.

Closes Homebrew/homebrew#38466.
2015-04-09 00:42:43 -07:00
Tim D. Smith
5a0ec0c491 add SoftwareSpec#go_resource
by analogy to similar code in formula.rb.

Permits Homebrew/homebrew#37877. Closes Homebrew/homebrew#38330.
2015-04-06 20:26:52 -07:00
Jack Nagel
abb0cb3aa0 Switch to a more useful serialization of tap info
Closes Homebrew/homebrew#37383.
2015-03-14 21:14:37 -04:00
Xu Cheng
c8835afead move formula_specialties to compat
Closes Homebrew/homebrew#37365.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-03-04 23:20:13 +08:00
Xu Cheng
40087e30df ruby 1.8 doesn't have sort_by!
Closes Homebrew/homebrew#36935

Closes Homebrew/homebrew#36936.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-02-19 02:02:43 +08:00