Having used Gentoo for a few years now, one thing that has been annoying
to me is the tremendous duplication of effort and uphill battle of
creating ebuilds (build recipes) for language-specific packages that
already have their own build systems.

For example, many languages such as Python (pip), Node (npm), Ruby
(gems), TeXLive (tlmgr), Haskell (cabal), Rust (cargo) have ways of
redistributing up-to-date dependencies and ensuring that they build
properly in most environments. Portage, it seems, does not take
advantage of this at all. If I want to install the package 'foo', which
has 'bar' as a dependency (which has been installed through cabal, for
instance). Why should portage download some outdated second copy of the
sources for 'bar', rebuild it, and scatter it around the file system
where it cannot be used by other programs installed by cabal?

It seems reasonable to me to 'hook' portage into these other package
managers, so that running 'emerge bar' would actually run 'cabal install
bar' rather than downloading sources and running 'ghc'. This would make
managing dependencies much easier as versions change, since most (all?)
these alternate package managers have ways of specifying specific
versions of packages or pinning. It would also put an end to the
breakage caused by, for example, running 'pip' as root and breaking all
the python libraries portage has pulled in.

I also notice that there is a GSoC 2018 project for integrating Rust
more closely within Gentoo. It seems to me that allowing ebuilds to be
written like this would help resolve this not only for Rust, but for all
languages with similar build systems (which is most modern languages,
frankly).

The only real issue I see with this is the potential loss of granularity
with USE flags for some of these packages, but having poked around the
sort of language-specific libraries and bindings available, hardly any
have any USE flags available, and those that do only offer debug symbols
or documentation, which many of these other build systems offer as well,
so I doubt this would be an issue for anyone. I could of course be wrong.

Is this a feature/improvement other Gentoo users/developers would be
interested in? If so, I would love to help discuss and potentially help
with its implementation.



Reply via email to