coalms,
We were all new to Gentoo once. Just when you get that hang of it, it changes. It seems like after 20 years, I'm still new :)
A few words on slotting.
Slotting is expensive in terms of developer time. Two different versions of the same package will want to install the same files. Slotting keeps the installed files apart.
Its not automatic.
gcc is slotted.
Code: Select all
[U] sys-devel/gcc
Available versions:
(8.5.0) [M]8.5.0-r1^t
(9.5.0) [M]9.5.0^t
(10) [M]10.5.0^t
(11) 11.4.1_p20230622^t (~)11.4.1_p20230824^t **11.4.1_p20231116^t **11.4.1_p20231123^t **11.4.1_p20231130^t **11.5.9999*l^t
(12) 12.3.1_p20230825^t **12.3.1_p20231117^t **12.3.1_p20231124^t **12.3.1_p20231201^t **12.4.9999*l^t
(13) 13.2.1_p20230826^t{tbz2} (~)13.2.1_p20231014^t{tbz2,xpak:2} **13.2.1_p20231118^t **13.2.1_p20231125^t **13.3.9999*l^t
(14) **14.0.0_pre20231119^t **14.0.0_pre20231126^t **14.0.0.9999*l^t
Its possible to install one version in each slot. Prior to slot 10, slots were down to patch versions. That was dropped due to the maintenance burden.
Rust is not slotted, so you may only install one version at a time.
is there a way to keep multiple versions on the system without them being umerged at some point in the future?
Yes and no. You can keep binary packages that you build yourself and reuse them in future.
Read about FEATURES in
Now you can switch between multiple home made binaries with an emerge command.
That's the theory.
In practice, ebuilds get removed from the repo. You need the ebuild to install your binary.
Other things, depend on certain versions, so when you try to downgrade, portage may tell you you can't do that.
Code: Select all
Your "SLOT='nameofslot' emerge another-other-other-version-of-firefox --emptytree"
Does not do what you think it does.
Code: Select all
$ SLOT="foo" emerge sys-devel/gcc -1vp
These are the packages that would be merged, in order:
Calculating dependencies
Dependency resolution took 1.96 s (backtrack: 0/20).
[ebuild R ] sys-devel/gcc-13.2.1_p20231014:13::gentoo USE="(cxx) fortran graphite lto nls nptl openmp (pie) sanitize ssp -ada (-cet) (-custom-cflags) -d -debug -default-stack-clash-protection -default-znow -doc (-fixed-point) -go -hardened (-ieee-long-double) -jit (-libssp) -modula2 (-multilib) -objc -objc++ -objc-gc (-pch) -pgo -systemtap -test -valgrind -vanilla -vtv -zstd" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Read the output as <category>/<package>-<version>:<slot>::<repo>, so that's sys-devel/gcc, version 13.2.1_p20231014 in slot 13 using the ebuild from the gentee repo.
The environment variable SLOT= is ignored.
If rust-bin does not work on musl, it should not be possible to install it there. That's a bug.
As you say the work around is to mask the -bin. That's dev-lang/rust-bin, not the virtual.
virtuals are a portage trick for dependency resolution. They do not install any code.
When several packages can satisfy a dependency, e.g. dev-lang/rust-bin and dev-lang/rust, the packages that need rust will depend on virtual/rust.
The virtual will list suitable packages in preference order. From virtual/rust ...
Code: Select all
RDEPEND="|| (
~dev-lang/rust-bin-${PV}[rustfmt?,${MULTILIB_USEDEP}]
~dev-lang/rust-${PV}[rustfmt?,${MULTILIB_USEDEP}]
)"
so the binary is preferred, as its listed first.
When the dependency resolver finds that the virtual is satisfied, it will not install anything.
You can mask dev-lang/rust-bin, so it not available, that will force dev-lang/rust to be built.
At world updates, give
and see if portage can find a dependency resolution without updating rust.
You may want to use
to tell portage to try very hard to find a solution.