New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve link status on reinstall/upgrade. #2961

Merged
merged 1 commit into from Jul 30, 2017

Conversation

Projects
None yet
4 participants
@MikeMcQuaid
Copy link
Member

MikeMcQuaid commented Jul 28, 2017

This means if a user has manually brew unlink or brew link --forced something then that status will be preserved after they brew upgrade or brew reinstall that formula.

This generally should make things that are keg-only by default easier to swallow.

@ghost

This comment has been minimized.

Copy link

ghost commented Jul 28, 2017

could you tell me where in the filesystem this information is stored?
just trying to understand more of homebrew

thanks

@ilovezfs

This comment has been minimized.

Copy link
Contributor

ilovezfs commented Jul 28, 2017

ls -l $(brew --prefix)/var/homebrew/linked
@ghost

This comment has been minimized.

Copy link

ghost commented Jul 28, 2017

thanks for the quick response

so you just create a symlink for the formula into this directory and then check back on demand?

@@ -711,7 +718,7 @@ def build
end

def link(keg)
if formula.keg_only?
unless @keg_was_linked

This comment has been minimized.

@reitermarkus

reitermarkus Jul 29, 2017

Member

Shouldn't this still only pertain to Keg-only Formulae, since it returns?

This comment has been minimized.

@MikeMcQuaid

MikeMcQuaid Jul 29, 2017

Member

@reitermarkus This logic is badly broken but in general: no because we're trying to maintain link status, keg-only or not.

@MikeMcQuaid MikeMcQuaid force-pushed the MikeMcQuaid:preserve-link-on-upgrade-reinstall branch 2 times, most recently from 3bac56b to f288380 Jul 29, 2017

Preserve link status on reinstall/upgrade.
This means if a user has manually `brew unlink` or `brew link --force`d
something then that status will be preserved after they `brew upgrade`
or `brew reinstall` that formula.

This generally should make things that are keg-only by default easier
to swallow.

@MikeMcQuaid MikeMcQuaid force-pushed the MikeMcQuaid:preserve-link-on-upgrade-reinstall branch from f288380 to 7ec0505 Jul 30, 2017

@MikeMcQuaid MikeMcQuaid merged commit e1fd69d into Homebrew:master Jul 30, 2017

3 checks passed

codecov/patch 75% of diff hit (target 66.51%)
Details
codecov/project 66.52% (+<.01%) compared to 0595678
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MikeMcQuaid MikeMcQuaid deleted the MikeMcQuaid:preserve-link-on-upgrade-reinstall branch Jul 30, 2017

@ianthehenry

This comment has been minimized.

Copy link

ianthehenry commented Jul 30, 2017

@MikeMcQuaid This has a typo -- install_dependency

linked_keg = Keg.new(df.linked_keg.resolved_path)
keg_was_linked = keg.linked?
linked_keg.unlink

Undefined variable keg.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Jul 30, 2017

@ianthehenry Thanks! What command did you hit that running?

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Jul 30, 2017

@ianthehenry Fixed in 9d55446, thanks again.

@ianthehenry

This comment has been minimized.

Copy link

ianthehenry commented Jul 30, 2017

@MikeMcQuaid That was fast! Both brew install and brew upgrade were failing when the command required installing/upgrading a dependency. (Found it trying to upgrade cairo, which required upgrading libpng). My very-short-term workaround was just installing each dependency manually.

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.