| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Otherwise we could end up removing files unnecessarily.
|
|
This avoids needing to use `force: true` and still let's Homebrew do
what we want with our own taps.
|
|
|
|
Use `oh1` for moving kegs to a new directory.
|
|
Move the checks for moving kegs to a new directory into the relevant
method (`move_to_new_directory`) instead. Also, delete duplicated
directories when we’ve confirmed they are definitely duplicated rather
than telling users to do so.
|
|
Add methods to determine if a migration is needed and perform it if so
(and no-op if not). Additionally, make `ARGV.force?` get passed as a
parameter so it can be overridden without requiring users to pass
`—force`.
|
|
Need to check for two `/`s rather than one.
|
|
Lets us migrate a formula to a name that may have previously been used.
If gnupg 1.x is installed as "gnupg" and gnupg 2.x is installed as
"gnupg2," it's currently not possible to rename gnupg2 -> gnupg, since
the 1.4 keg will already be installed in the "gnupg" Cellar, so in order
to reclaim the name "gnupg" to be used for 2.1, either 1.x must be
manually uninstalled, or the new cellar needs to be allowed to exist
already.
|
|
...and update man pages where applicable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
But remove some manual `.freeze`s on constants that shouldn't be
constants.
|
|
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.
|
|
|
|
formula_rename and tap_migrations are now handled inside Tap.
Closes Homebrew/homebrew#49549.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
|
|
Closes Homebrew/homebrew#46537.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
When there's absolute symlinks in a linked directory in the `keg`
(e.g. `bin`)that point to the `Cellar` or `opt` then linking the `keg`
will fail before the `Cellar` or `opt` has been linked.
Closes Homebrew/homebrew#44306.
Closes Homebrew/homebrew#44329.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
Closes Homebrew/homebrew#43473.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
|
|
|
|
|
|
|
|
Link the keg that was linked before migration. Don't use
newformula.installed_prefix to detect keg to link, because it can break
things (i.e. if intalled formula is outdated, then
newformula.installed_prefix can be not the same as installed prefix
before update).
Closes Homebrew/homebrew#42857.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
- link newname only if oldname used to be linked
- optlink newname only if oldname used to be optlinked.
|
|
- check if old_opt_record exist before using realpath
- don’t check old_opt_record.exist? in link_old_opt
because it doesn’t have to exist.
|
|
Closes Homebrew/homebrew#42938.
|
|
Closes Homebrew/homebrew#42745.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
|