-
jperkin
pjustice: yeh, sorry, the pkg_alternatives interface is horrendous - it was deliberately modelled on a similar tool in debian I believe, but I _always_ have to go to the manual page to figure out what I need to do
-
jperkin
just check that there is an +ALTERNATIVES file in the pkgdb for each package you want to use, e.g. /opt/local/pkg/go122*/+ALTERNATIVES
-
jperkin
also verify that you aren't installing the "go" meta-package, that will always pull in a specific version tied to whatever is the current default across the tree
-
jperkin
-
pjustice
The go meta-package seems to point to 1.22, though.
-
pjustice
But telling alternatives to `auto` results in 1.18.
-
jperkin
yeh any meta-package like that and pkg_alternatives are fundamentally incompatible (which is why in the past I removed the 'ruby' meta-package, I should probably do the same with 'go')
-
pjustice
So how do I tell alternatives to un-everything go and let the metapackage win?
-
jperkin
oh, you _want_ to use the meta package..
-
pjustice
Well, it seems to do a reasonable job of staying in the zone where most stuff works.
-
jperkin
I'll need to do some testing, as I'm not sure it'll work reliably - whenever you upgrade the go packages I think the pkg_alternatives registration will re-run
-
jperkin
it's why they're fundamentally incompatible
-
pjustice
Ah, ok. I'll just make my automation set it manually then. And remove the meta-package.
-
pjustice
Thanks!
-
jperkin
ok, I think I'll go ahead and remove it to avoid future confusion
-
jperkin
oh I'm mistaken, it's not like the ruby meta-package, it literally just depends on go, it doesn't provide its own wrappers
-
jperkin
so you should be able to continue using it, but there's no way for pkg_alternatives to know which one you want based simply on installing 'go', so if you have multiple go* installed then you'll still need to 'pkg_alternatives manual go<x>' to explicitly select a version
-
pjustice
Without the meta-package, and with multiple installed go1xx, what will be / is there a default?
-
jperkin
I think it'll default to whatever version you installed first
-
pjustice
Thanks
-
jperkin
after that it should respect any override