aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/keg.rb
AgeCommit message (Collapse)Author
2017-10-18Use “squiggly” heredocs.Markus Reiter
2017-09-24Rubocop: automatic rule fixes.Mike McQuaid
2017-08-05keg: cleanup aliases correctly.Mike McQuaid
This was missed when I was focused on cleaning up versioned aliases. Fixes #2992.
2017-07-28keg: correctly cleanup old aliases.Mike McQuaid
Cleanup old, versioned aliases and tap aliases folders when unlinking or uninstalling a keg.
2017-06-02Re-revert "Fix operator spacing."Markus Reiter
2017-06-01Revert "Fix operator spacing."ilovezfs
2017-05-31Fix operator spacing.Markus Reiter
2017-05-29Fixup all RuboCop warnings.Mike McQuaid
2017-05-25Rename `FormulaLock` to `LockFile`.Markus Reiter
2017-05-09keg: skip opt versioned aliases for devel/head.Mike McQuaid
These versioned aliases don’t correspond to the correct version if not Installed from stable. Fixes #2596.
2017-04-01keg: correctly remove alias symlinks.Mike McQuaid
Fixes #2427.
2017-03-19caveats: combine completion and function messagesAlex Dunn
Fixes https://github.com/Homebrew/homebrew-core/issues/10338. Closes #2287. Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
2017-03-08keg: resolve rack aliases correctly.Mike McQuaid
Don't use the basename but instead use the Formulary logic for rack formula resolution. Fixes #2288.
2017-02-24Check for metafiles only in the root directoryNaoto Kaneko
2017-02-23Exclude executables from metafilesNaoto Kaneko
Exclude executables in #empty_installation? to avoid 'Empty Installation' error when only executable which name is the same as one of metafiles is installed.
2017-02-21keg: handle missing alias opt link on uninstall.Mike McQuaid
Fixes an issue introduced in #1192 where there would be a failure if the alias link didn't exist on removal (which would be the case for anything with an alias installed before #1192 was merged).
2017-02-20keg: simplify code, handle exceptions.Mike McQuaid
2017-02-20have opt alias symlink point into the Cellarilovezfs
in case people expect to be able to find the prefix by only resolving the symlink once (e.g., if they're using readlink not realpath)
2017-02-20remove unless empty since each is no-op for emptyilovezfs
2017-02-20keg: create symlinks in opt for formula aliasesilovezfs
2017-02-11Move `require_relocation?` from `os/mac/keg` to `keg`.Markus Reiter
2017-02-10Revert "Use `Open3` for integration tests instead of manually forking."ilovezfs
2017-02-09Use `false` instead of `# no-op`.Markus Reiter
2017-02-09Use `Open3` for integration tests instead of manually forking.Markus Reiter
2017-01-19keg: use Forwardable to methods delegated to #pathAlyssa Ross
2017-01-19keg: don't conditionally switch alias targetAlyssa Ross
This seems to be a remnant of Ruby 1.8.
2017-01-09caveats, keg: remove linkapps caveats code.Mike McQuaid
2017-01-06keg: use resolved_path not realpath.Mike McQuaid
This guards against this being a non-symlink in which case it will fail.
2017-01-03Merge pull request #1677 from MikeMcQuaid/formula-prefix-optMike McQuaid
formula: make prefix usually return opt_prefix.
2017-01-01keg: check installed dependencies iff optlinkedAlyssa Ross
2017-01-01keg: keg_only kegs can have installed dependentsAlyssa Ross
2017-01-01keg: update installed dependency resolutionAlyssa Ross
Closes #1525. (See there for a motivation for this change.)
2016-12-31keg: handle dependencies of moved/renamed formulaeAlyssa Ross
In #1497 I switched from Keg#to_formula for comparing kegs to formulae to comparing the name and tap in the keg's tab to the name and tap of the formula. However, this fails to match if the name and tap of the formula have changed since the keg was installed, so it's clearly better to use Keg#to_formula where possible, and fall back to the information in the tab when #to_formula can't be used.
2016-12-31Merge pull request #1750 from alyssais/fallback_dependenciesMike McQuaid
keg: fall back for dependencies of buggy tabs
2016-12-31Merge pull request #1756 from alyssais/nil_dependentsMike McQuaid
keg: don't return nil dependencies
2016-12-31formula: make prefix usually return opt_prefix.Mike McQuaid
Return `opt_prefix` if it exists and `prefix` is not called from within the same formula's `install` or `post_install` methods. Otherwise, fall back to the existing functionality. This avoids the need to use `opt_prefix` etc. everywhere and generally means we don't expose an implementation detail (i.e. the full Cellar path) to dependents that have a habit of hard-coding it.
2016-12-31keg: don't return nil dependenciesAlyssa Ross
This is a proper fix to the problem addressed by #1510. The problem arises when f_kegs is nil, which can happen if the name and tap used to install a keg don't match the name and tap currently associated with its formula (i.e. if it's been renamed or moved).
2016-12-30docs: improve Keg.find_some_installed_dependenciesAlyssa Ross
See https://github.com/Homebrew/brew/pull/1752#discussion_r94257147
2016-12-30tab: remove #reliable_runtime_dependencies?Alyssa Ross
See https://github.com/Homebrew/brew/pull/1750#discussion_r94243825 for discussion. Removes Tab#reliable_runtime_dependencies? in favour of returning nil from Tab#runtime_dependencies if the list is unreliable. Because Homebrew 1.1.6 hasn't been tagged yet, tabs created in tests aren't created with a homebrew_version that marks the runtime_dependencies in the Tab as reliable, so there are some tests that fail. To work around this, I've had to add a line to some tests that explicitly overrides the homebrew_version in the Tab. This is really ugly though, so they should be removed as soon as possible after 1.1.6 is released.
2016-12-30keg: fix fallback dependencies with multiple kegsAlyssa Ross
Fixes #1524.
2016-12-30keg: fall back for dependencies of buggy tabsAlyssa Ross
Fixes #1554.
2016-12-27keg: fix dependents with unavailable formulaeAlyssa Ross
Because of an accidental use of `=` instead of `==`, the source formula check would be skipped when determining if a keg depended on another one (so only the versions would be compared). Fixed that comparison, and updated the corresponding test. Glad I caught that!
2016-12-27keg: installed dependencies of unknown formulaeAlyssa Ross
Previously, trying to resolve the dependencies of a keg would raise an exception if the formulae for any of the dependencies could not be found (e.g. if it had been moved to another tap). This commit updates the dependency finding logic to catch these exceptions, and fall back to comparing names and taps of formulae, which should give the correct behaviour. Fixes #1586.
2016-12-12Merge pull request #1616 from zachwhaley/zsh_functions_caveatsMike McQuaid
caveats: Differentiate zsh completion files and function files
2016-12-11keg: also prune opt.Mike McQuaid
If there's dead symlinks in there they should be removed.
2016-12-08caveats: Differentiate zsh completion files and function filesZach Whaley
When installing a file to zsh/site-functions directory, it is assumed this is a zsh completion file, and the zsh completion caveat is printed after installation. But not all files in the zsh/site-functions directory are completion files. Some are files for functions that can be loaded on demand with zsh's autoload command. - Edit Keg.completion_installed to search specifically for files in the zsh/site-functions directory starting with an underscore only (By convention, zsh completion files start with an underscore) - Add Keg.zsh_functions_installed to search for non-completion files in the zsh/site-functions - Add Caveats.zsh_function_caveats to print a caveat if non-completion files have been installed to zsh/site-functions
2016-12-04Add a method for installing fish function filesZach Whaley
Fish shell allows third-party software vendors to put their own function files in a directory for their software. For brew installed Fish shell, this is /usr/local/share/fish/vendor_functions.d
2016-11-13keg: don't rely on #to_formulaAlyssa Ross
It doesn't always work. For example, a keg could have been installed with a formula from a URL, which Homebrew now does not know how to access. Fixes #1496.
2016-10-25uninstall: go easier on the integration testsAlyssa Ross
2016-10-25uninstall, keg: update styleAlyssa Ross