3 ms·
> Instead of modifying all the packages that depend on GNU coreutils (known as the package sys-apps/coreutils in Gentoo), I modified the GNU coreutils package t
by M95D 2y ago
> Instead of modifying all the packages that depend on GNU coreutils (known as the package sys-apps/coreutils in Gentoo), I modified the GNU coreutils package to instead install uutils coreutils.
That's not the way to do it (in Gentoo). He should have added coreutils to /etc/portage/profile/package.provided. Portage would then assume the package is installed even if it's not. This is used to install self-built binaries or packages from other distributions instead of packages provided by portage.
https://wiki.gentoo.org/wiki//etc/portage/profile/package.provided https://wiki.gentoo.org/wiki//etc/portage/profile/package.pr...
- nubinetwork 2y agoI also cringed a little when I read that they used the same package name for their replacement, especially considering they were aware of virtuals and the alternatives frameworks... although I've never tried to do what they did, so maybe they had issues converting the entire portage tree to be compliant. I'll admit that it's a lot of work, but if you wanted to do it right, you'd have to put in that additional work.
- yjftsjthsd-h 2y agoI don't think this was meant to be "doing it right"; this was explicitly the quick and dirty way to test things.
- account42 2y agoUsing package.provided for this is as much of a hack as modifying the coreutils package.
- JoshMcguigan 2y agoThanks for pointing out `package.provided`. It does look like it could be a reasonable way to do this, but I'm not sure how exactly I'd be able to atomically swap GNU coreutils for uutils coreutils using that method? I think I'd need to add `sys-apps/coreutils` to `package.provided`, then install uutils coreutils while telling Portage to ignore file collisions (because I'd be overwriting GNU coreutils binaries). However, that would have hidden the fact that I would have also been overwriting binaries from other packages (for example `hostname`, which is provided by `sys-apps/net-tools` in Gentoo).
- M95D 2y agopackages.provided only bypasses the dependency issues. File collisions is a different problem with different solution(s). For a quick test, if I had to do it, I would probably make the ebuild install uutils in /usr/local/, then unmerge coreutils (and probably have a static busybox on stand-by, just in case).