Mike McQuaid
2ecd73bca4
update-report: migrate on newer auto-update.
...
If we have a `brew.sh` which has set
`HOMEBREW_ENABLE_AUTO_UPDATE_MIGRATION` then let's allow an auto-update
migration. That's because it contains the fix below it _before_ the
update happened which means the auto-update won't fail in the same way
as if updating from an old version.
2016-09-20 09:07:02 +01:00
Mike McQuaid
8bf405e5f7
update-report: print message on completion link failure.
2016-09-20 08:03:06 +01:00
Mike McQuaid
1f128331b6
update-report: don't migrate on auto-update.
2016-09-20 08:02:52 +01:00
Markus Reiter
c0cc703516
update-report: Do not migrate Caskroom
to HOMEBREW_REPOSITORY
.
2016-09-19 17:49:40 +02:00
Mike McQuaid
c9d9e54de6
Fix brew style
from #971 .
2016-09-19 16:04:32 +01:00
Mike McQuaid
c45119de75
Merge pull request #971 from penman/follow_alias
...
Make `brew upgrade` and `brew outdated` follow alias changes
2016-09-19 15:22:24 +01:00
Mike McQuaid
b0f3e38ff9
update-report: tweak migration failure message.
2016-09-19 14:32:56 +01:00
Mike McQuaid
13f08a2bd4
update-report: add missing comma.
2016-09-19 11:51:17 +01:00
Mike McQuaid
a212340cc1
update-report: also migrate Caskroom.
2016-09-19 11:43:11 +01:00
Mike McQuaid
263a8a0b73
style: no args default to Library/Homebrew.
2016-09-19 11:18:10 +01:00
Mike McQuaid
3686243e5a
style: don't require HOMEBREW_DEVELOPER to fix.
2016-09-19 11:18:09 +01:00
Mike McQuaid
e79f62b2ea
style: allow passing taps as arguments.
2016-09-19 11:18:09 +01:00
Mike McQuaid
a2f19f0a67
update-report: tweak migration messaging
...
References #1023 .
2016-09-19 09:52:13 +01:00
Mike McQuaid
6e1312d4a1
Merge pull request #1011 from MikeMcQuaid/migrate-legacy-repository-everyone
...
update-report: migrate everyone to new repository.
2016-09-19 09:05:14 +01:00
Mike McQuaid
167af26a24
Merge pull request #1019 from MikeMcQuaid/macos-rename
...
Use new "macOS" naming where appropriate.
2016-09-19 08:17:36 +01:00
Andrew Janke
245838d86d
info: print requirements
2016-09-18 19:44:41 -04:00
Mike McQuaid
d0204207ed
update-report: remove cask dir after migration.
...
This will hang around otherwise due to e.g. running `bundle install` in
here once.
2016-09-18 21:42:44 +01:00
Mike McQuaid
42e9782dd6
update-report: cleanup git harder in migration.
...
Before stashing also try to cancel any current merge, rebase and
reset. This will prevent any data loss but also make the stash more
likely to succeed.
2016-09-18 20:25:18 +01:00
Mike McQuaid
027d8923f2
Merge pull request #1018 from MikeMcQuaid/update-migration-create-cellar
...
update-report: also create Cellar on migration.
2016-09-18 20:18:53 +01:00
Mike McQuaid
8bae49941c
outdated: prefer .join over *.
2016-09-18 19:58:12 +01:00
Alyssa Ross
d3788c58ef
brew outdated: use full name in verbose
2016-09-18 19:58:12 +01:00
Alyssa Ross
c874b4e4c2
install: don't install alias if already installed
2016-09-18 19:58:11 +01:00
Alyssa Ross
2a683f2569
upgrade, outdated: follow alias changes
2016-09-18 19:58:09 +01:00
Mike McQuaid
3f9cce0a03
Use new "macOS" naming where appropriate.
...
Not quite a mass replacement as I've used OS X and Mac OS X where
describing specific older versions and added compatibility methods
for things in the DSL.
2016-09-18 19:57:19 +01:00
Mike McQuaid
fc04d8f4f6
update-report: also create Cellar on migration.
...
Just on the off chance it doesn't exist (i.e. no-one has installed
anything yet or you're a `test-bot` that's run `git clean -xdf`
recently)
2016-09-18 19:32:29 +01:00
Mike McQuaid
ee0fb3e999
update-report: handle directory not existing.
...
This shouldn't be possible to occur after #1013 but it makes sense to
add it anyway.
2016-09-18 16:55:59 +01:00
Mike McQuaid
89ebffadec
update-report: create top-level directories later.
...
Otherwise if they are created and empty they may be removed again
before we try to create the `/usr/local/bin/brew` symlink.
2016-09-18 16:06:49 +01:00
Mike McQuaid
72d0154454
update-report: migrate everyone to new repository.
...
Also migrate people without `HOMEBREW_DEVELOPER` set to the new
location.
2016-09-18 15:44:06 +01:00
Mike McQuaid
e20467971e
Merge pull request #963 from MikeMcQuaid/migrate-repository
...
update-report: migrate /usr/local repository.
2016-09-18 15:41:04 +01:00
Mike McQuaid
ad466452de
Merge pull request #1007 from MikeMcQuaid/update-remote-ref
...
update.sh: turn origin/branch into a variable.
2016-09-18 15:32:44 +01:00
Mike McQuaid
0a09ae30f8
update-report: migrate /usr/local repository.
...
Migrate a HOMEBREW_REPOSITORY and HOMEBREW_PREFIX of `/usr/local` so
that the HOMEBREW_REPOSITORY is now in `/usr/local/Homebrew`. This gives
us more flexibility on changing the repository layout in future and
avoids putting junk in `/usr/local` when not necessary (e.g. our
`README.md`).
2016-09-18 13:49:02 +01:00
Mike McQuaid
d70841db2b
update.sh: turn origin/branch into a variable.
...
Rather than repeating origin multiple times.
2016-09-18 13:45:32 +01:00
Mike McQuaid
3982950e61
rubocop --auto-correct all hash-rocket usage.
2016-09-17 16:14:13 +01:00
Mike McQuaid
8f1ae3b28b
Move LinkedKegs migration.
...
Move the `LinkedKegs` migration into `utils.rb` so it can also be called
from `brew.rb` on startup.
2016-09-17 15:00:46 +01:00
Mike McQuaid
8aa18510c4
Always run LinkedKegs migration (if needed).
...
Ensure that `brew update` always runs the LinkedKegs migration if needed
as it may not have been run by `brew update` if it was using `--preinstall` or
a `git pull` etc.
Also, if the old paths still exist: just use them instead.
Finally, always try to unlink/unpin before link/pin.
Fixes https://github.com/Homebrew/homebrew-core/issues/4918 .
2016-09-17 13:25:32 +01:00
Mike McQuaid
e3609b6fd4
Move LinkedKegs/PinnedKegs/Locks from Library.
...
These don't make sense to be tied to the `HOMEBREW_REPOSITORY` but
instead should live in the `HOMEBREW_PREFIX` as they all relate to its
state.
2016-09-16 13:51:56 +01:00
Mike McQuaid
72d10fff0b
Use constants for LinkedKegs/PinnedKegs/Locks.
...
These definitions are scattered throughout the codebase which makes it
hard to refactor them later (my goal is to move them outside of
HOMEBREW_LIBRARY). Unify their definitions for clearer code and easier
movement later.
2016-09-15 18:28:42 +01:00
Zhiming Wang
54884cd9ce
Merge pull request #903 from zmwangx/always-show-dev-commands
...
cmd/commands: always show developer commands
2016-09-14 02:50:32 -04:00
Mike McQuaid
1174264d47
cmd/uses: fix Rubocop warnings.
2016-09-11 17:59:01 +01:00
Mike McQuaid
2c5beb0eff
cmd/upgrade: fix Rubocop warnings.
2016-09-11 17:59:01 +01:00
Mike McQuaid
cc526601cf
cmd/update-report: fix Rubocop warnings.
2016-09-11 17:59:01 +01:00
Mike McQuaid
49e009df29
cmd/unpack: fix Rubocop warnings.
2016-09-11 17:59:01 +01:00
Mike McQuaid
7b41ccd2ea
cmd/unlinkapps: fix Rubocop warnings.
2016-09-11 17:59:00 +01:00
Mike McQuaid
56fc1c725a
cmd/uninstall: fix Rubocop warnings.
2016-09-11 17:59:00 +01:00
Mike McQuaid
a0c29eb1af
cmd/tap-info: fix Rubocop warnings.
2016-09-11 17:59:00 +01:00
Mike McQuaid
b9b07fc082
cmd/search: fix Rubocop warnings.
2016-09-11 17:59:00 +01:00
Mike McQuaid
f9c621304d
cmd/prune: fix Rubocop warnings.
2016-09-11 17:59:00 +01:00
Mike McQuaid
ae43b79ca2
cmd/missing: fix Rubocop warnings.
2016-09-11 17:59:00 +01:00
Mike McQuaid
4e090530b1
cmd/log: fix Rubocop warnings.
2016-09-11 17:59:00 +01:00
Mike McQuaid
9d782454ab
cmd/list: fix Rubocop warnings.
2016-09-11 17:58:59 +01:00