3632 Commits

Author SHA1 Message Date
Xu Cheng
a88c40b8c8 core file style update 2015-08-22 13:15:33 +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
04a0b2aafe Mark TODO in brew doctor (future PR) 2015-08-21 11:02:33 -07:00
William Woodruff
56795ec1ed Call check_xcode check for CLT, too 2015-08-21 11:02:33 -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
William Woodruff
f58506ea6f FormulaInstaller: add prevent_build_flags to eliminate code repetition
remove unneeded definition

change variable in FormulaInstaller.check_build_flags from bf to build_flags
2015-08-21 10:59:35 -07:00
William Woodruff
91e598cf3f Install: add BuildToolsError and BuildFlagsError
Add these new errors, and guards in formula installation and
cmd/{,un,re}install to match, move can_build? to the MacOS module,
flatten conditions, remove redundant can_build? check

reinstate removed (doctor) check
2015-08-21 10:59:09 -07:00
William Woodruff
85187bf6d3 MacOS: update locate_cctool
This becomes MacOS.{install_name_tool,otool}, only do check_xcode if
xcode is installed, otherwise emit a warning
2015-08-21 10:58:13 -07:00
William Woodruff
b46d5de492 Requirements: add CctoolsRequirement
Install it as a dependency unless already satisfied by Xcode.

require cctools_requirement

cctools_requirement should be satisfied by cctools present in opt

add build_env => false to the satify block options in CctoolsRequirement
2015-08-21 10:57:20 -07:00
William Woodruff
4d65b817ec Install: remove check_for_bad_install_name_tool
Until it can be adapted to not call otool on systems w/o XCode/CLT
2015-08-21 10:56:46 -07:00
Xu Cheng
d09d2690ca tap: add --list-pinned 2015-08-21 20:08:13 +08:00
Xu Cheng
ac71386373 test-bot: tap TapDependency recursively
Closes Homebrew/homebrew#43145.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-21 15:17:21 +08:00
Xu Cheng
62d1636144 update: only update renamed when necessary 2015-08-20 20:12:02 +08:00
Vlad Shablinsky
e4480cf6bf update: add formula renames to report 2015-08-20 19:55:35 +08:00
Xu Cheng
4740d7fad4 uninstall: simplify logic
Also reduce unnecessary disk operations

Closes Homebrew/homebrew#43024.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-18 15:58:07 +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
Baptiste Fontaine
f690b54621 Suggest 'brew uninstall' everywhere for consistency
Mixing 'brew remove' with 'brew uninstall' can confuse users.

Closes Homebrew/homebrew#43026.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-17 20:36:02 +02:00
Xu Cheng
a380ec636e enable sandbox on test-bot
Closes Homebrew/homebrew#43014.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-17 14:12:11 +08:00
Dominyk Tiller
63a7f29270 cleanup: require thread 2015-08-16 21:01:52 +01:00
Xu Cheng
c4df86eb9d cleanup: speed up rm_DS_Store by multithread
Before

```
$ time brew cleanup -s
brew cleanup -s  0.73s user 3.52s system 58% cpu 7.297 total
```

After

```
$ time brew cleanup -s
brew cleanup -s  0.69s user 2.57s system 139% cpu 2.341 total
```

Closes Homebrew/homebrew#42968.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-17 01:54:03 +08:00
Vlad Shablinsky
d3037f7044 update opt for renamed formula
After the formula gets renamed oldname opt is created and
it points to the linked keg. However if we then upgrade newname
oldname opt still points to the same keg it pointed before upgrade.
The commit fixes this behaviour thus that oldname opt links at the
same keg opt point.
2015-08-17 01:53:58 +08:00
Mike McQuaid
9025719968 cleanup: fix reversed prune time. 2015-08-16 17:50:33 +01:00
Mike McQuaid
76316a82cb cleanup: tweak prune code. 2015-08-16 16:57:12 +01:00
Martin Afanasjew
e85e57b217 cleanup: make --force less aggressive
Change behavior for `brew cleanup` as follows:

- If `--force` is supplied, remove only outdated keg-only packages.
- If `--prune=<days>` is supplied, remove both logs and cached downloads
  older than the specified number of days. Use `--prune=all` to remove
  all logs and cached downloads irrespective of age.
- By default, remove logs after 14 days and cached downloads never.

Also centralizes handling of `--prune`, thus removing duplicate logic.

This is motivated by commit 17eee232838d4639b25f863aa342b1dda61b81bc
that made `--force` much more aggressive and made it override whatever
was specified via `--prune`, completely removing all:

- outdated keg-only packages
- cached downloads irrespective of age
- logs irrespective of age

This made it impossible to remove outdated keg-only packages without
also deleting all cached downloads, which is at least inconvenient for
people with limited bandwidth wanting to rebuild packages later.

Closes Homebrew/homebrew#42970.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-16 16:47:24 +01:00
Xu Cheng
3c45e1e81d update: only compute tapd_basename when necessary 2015-08-15 18:32:22 +08:00
Xu Cheng
0bf2f92f46 outdated: remove unnecessary nested if 2015-08-15 16:18:17 +08:00
Xu Cheng
c518e50320 install: f.oldname can be nil 2015-08-15 15:56:57 +08:00
Mike McQuaid
02d8bfe10b install: mention if installed formula isn't migrated.
Closes Homebrew/homebrew#42940.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-14 15:18:45 +01:00
Mike McQuaid
49dce3e7ae outdated: check if formula needs to be migrated.
Closes Homebrew/homebrew#42938.
2015-08-14 15:18:45 +01:00
Baptiste Fontaine
3d7c38c736 doctor: suggest to install git if the system one is outdated
Closes Homebrew/homebrew#42934.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-14 12:06:57 +02:00
Xu Cheng
5414597913 cleanup: avoid duplicated logic
Closes Homebrew/homebrew#42900.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-14 15:52:57 +08:00
Xu Cheng
203cecb463 add Formula.racks
Also exclude symlink when enumerating installed racks.
2015-08-14 15:52:56 +08:00
Mike McQuaid
83ab0acfc0 test-bot: remove custom $HOME on --cleanup. 2015-08-13 10:55:29 +01:00
Mike McQuaid
15c3fb32b2 cleanup: remove SCM directories recursively. 2015-08-13 10:34:45 +01:00
Mike McQuaid
04b350dce5 cleanup: do cleanup even without a Cellar. 2015-08-13 10:31:37 +01:00
Mike McQuaid
e49a043401 cleanup: remove more on --force or --prune.
Remove more logs, use the prune time period and remove version control
checkouts when --force or --prune is used.
2015-08-13 10:22:28 +01:00
Mike McQuaid
2fc88ae247 test-bot: prune cache after 7 days.
Closes Homebrew/homebrew#42892.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-13 08:57:20 +01:00
Xu Cheng
638eda5f2d tap-info: fix for not installed tap
Closes Homebrew/homebrew#42890.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-13 15:49:46 +08:00
Viktor Szakats
0d4da4234a audit: enforce https on [*.]archive.org
Also:
* one minor regexp tweak

Closes Homebrew/homebrew#42761.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-11 19:04:23 +01:00
Xu Cheng
907dffcf04 test-bot: check file extname when calculating formulae diff
Closes Homebrew/homebrew#42806.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-11 18:14:27 +01:00
Vlad Shablinsky
3a764cb549 uninstall: fix --force
Closes Homebrew/homebrew#42814.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-11 18:13:13 +01:00
Mike McQuaid
3350f9018a test-bot: run git gc on cleanup.
Closes Homebrew/homebrew#42805.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-11 18:06:07 +01:00
Dominyk Tiller
64bcb5a07f audit: catch insecure bitbucket 2015-08-10 19:12:24 +01:00
Vlad Shablinsky
f88f2b7054 update tabs only if core formula installed
Closes Homebrew/homebrew#42745.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-10 16:09:26 +01:00
Vlad Shablinsky
0b854adbf4 update: fix load_tap_migrations 2015-08-10 16:09:26 +01:00
Vlad Shablinsky
6b0927944a update: handle renames on update 2015-08-10 13:57:59 +01:00
Vlad Shablinsky
abf6b6f6cf add migrate command for migrating renamed 2015-08-10 13:57:59 +01:00
Vlad Shablinsky
fa8b702c0d uninstall: change logic to handle renames 2015-08-10 13:57:59 +01:00
Vlad Shablinsky
6a0dcc8324 don't use new name rack if old name rack is a dir
Everything that used HOMEBREW_CELLAR/canonical_name
could point to something that doesn't exist because
loader_for tries to load new name formula if no old
name found. However there can be software installed
from path with the same name that renamed formulae
had and we still need to link/unlink/uninstall etc
that software. The solution is Formulary#to_rack
method that returns rack for given name.
- Add Formulary#to_rack
- Update ARGV.kegs
- Update cmd/switch
2015-08-10 13:57:59 +01:00
Vlad Shablinsky
556ab3bcd6 audit: add rules for naming
- restrict old names as names of new formulae
- warn about dependencies on old names
2015-08-10 13:57:58 +01:00