On 07/09/20 20:54, Grant Edwards wrote: > On 2020-09-07, Andreas K Hüttel <[email protected]> wrote: > >> That works, but pretty please try something else first! >> >> # make sure source-based rust is not in the world file >> emerge --deselect dev-lang/rust >> >> emerge -1 dev-lang/rust-bin >> >> It should be as easy as that. *If* all dependencies are fulfilled by >> both rust and rust-bin, then the second emerge call will unmerge >> rust and merge rust- bin. > > It did not. I executed the two commands shown above (the first > reported that no such atom was found in the world file). I ended up > with both dev-lang/rust and dev-lang/rust-bin installed.
If rust is called in as a dependency, it won't be in the world file, so the first command will have no effect ... > > When I subsequently ran "emerge --depclean --ask" it wanted to unmerge > dev-lang/rust-bin. rust-bin was emerged with the -1 option, ie "don't stick it in world" option > > I had to manually unmerge dev-lang/rust to get rid of it (which then > prevented --depclean from trying to unmerge rust-bin). > So --depclean, relying on what is in world, notices that nothing has a dependency on rust-bin and wants to remove it. > -- > Grant > What you need to do (and this is a pain, but ...) is to add rust-bin to the world file. There may be a --select option (opposite of deselect), or I'd just manually add it to the world file. At which point, anything with the virtual rust dependency will notice that rust-bin is installed, and use that. There's no way I know of to tell portage to use rust-bin rather than rust to satisfy the virtual and, indeed, it makes sense for rust-bin *not* to be the default. Cheers, Wol

