Re: news item: Introduction of app-alternatives/coreutils
Ionen Wolkens <[email protected]>
| Newsgroups | gmane.linux.gentoo.devel |
|---|---|
| Message-ID | <acFfXJhHvRzwWhBt@eversor> |
On Mon, Mar 23, 2026 at 11:35:31AM -0400, Eli Schwartz wrote:
> On 3/22/26 10:32 AM, Ulrich Müller wrote:
> >>>>>> On Sun, 22 Mar 2026, moltonel 3x Combo wrote:
> >
> > [Why have you dropped gentoo-dev from CC?]
> >
> >>> 2. Why do we need app-alternatives here, instead of a simple virtual
> >>> (plus a blocker)? I find renaming (e.g. gls, gcp) and symlinking
> >>> of all standard tools incredibly ugly.
> >
> >> The main argument against virtual+blocker is that we want to keep both
> >> packages co-installable.
> >
> > Entirely possible with a virtual. Have uu-coreutils install the programs
> > with prefixed names, and only install the generic names with some USE
> > flag. That same flag would also be a USE-conditional for the blocker
> > against coreutils.
>
>
> I am skeptical that this would work. Normally, blockers function by
> installing package cat/a which blocks the previously installed cat/b.
> So, a gets installed and then only afterwards b gets uninstalled, and
> a's files overwrite b's files which is fine because b is after all
> getting uninstalled and the PM is permitted to ignore collisions in this
> case.
>
> b's files never actually disappear. At any given time either a or b must
> be installed to provide the overlapping files.
>
> If we did this via USE blockers, then uutils could be rebuilt with
> USE="-native-symlinks" or whatever, *before* sys-apps/coreutils gets
> installed. This then breaks the system because no critical system
Can't we just have uutils RDEPEND on coreutils when -native-symlinks,
which makes portage emerge coreutils first before uutils is rebuilt.
And collisions should be ignored with the soft-blockers.
> binaries are available. Using the virtual does not, in the end, solve
> anything (unless they are treated as fully incompatible blocking
> packages), because there are transition states where the only package
> that is installed has broken USE. It might work one-way if coreutils is
> *fully* blocked by uutils[native-symlinks] but then you likely can't
> safely switch back.
>
> I seem to recall that portage has known buggy handling of this. In fact
> the only real solution is to rebuild coreutils ("package a") and have it
> overwrite uutils' symlinks, and then only afterwards rebuild uutils
> ("only afterwards package b gets uninstalled"), and ignore ALL file
> conflicts between the two. And then... what? Check after the fact and
> report an error? Real solution or not, the *correct* solution is to know
> when installing one package, what files the other package would
> eventually install, which presumes that binaries are used, which is why
> binary-only distros can avoid this problem.
>
> tl;dr
>
> app-alternatives is correct here.
>
>
>
> --
> Eli Schwartz
--
ionen
signature.asc
(application/pgp-signature, 525 B)
-----BEGIN PGP SIGNATURE----- iQFPBAABCAA5FiEEx3SLh1HBoPy/yLVYskQGsLCsQzQFAmnBX1sbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyAAoJELJEBrCwrEM0a08H/A5fsiS5yEsWVcko2+Fe ch0z+m9rzcId+YsOxJKuOqU0dvOKOeGq8eGeK0Cl5FfrvJH6w8xOecDVZb9uduBT ey+6aoPFVaSxAiGKIlI7RXc0bQ2x/8LaaRnxunmdps/sEiKsPoLnKi7M6NPw/gx9 IYUIJyAa9Yr0VggdSOT6iabXvz3bcHEMbpfVl8d6ajBc2RZZgPhzlYnMmRY4GSAs Q6oBG7lmB7eMZ8lsqAMieq0ewanGXxuZ+elWsiL0DC3a2AfsoMd/GmOP0Fic8sJs OhbLyYZu2Do2hYXdMzyTXSJlnKFHXu6Zx/SSqyn6RugC42YfiMpo7NIZY2ua9XpY oto= =00jA -----END PGP SIGNATURE-----