On Wed, Mar 7, 2018 at 11:51 AM, Michael Orlitzky <m...@gentoo.org> wrote:
> On 03/07/2018 11:06 AM, anote...@teknik.io wrote:
> > 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?
I'm really not happy with the tone of this email, so I'm going to comment
on it a bit.
> These other package managers don't solve any hard problems -- they're
> basically a fancy interface around wget and "git clone." Portage on the
> other hand has ~20 years of good ideas and hard work on the hard
> problems in package management. For example...
Portage is also full of not-good ideas; many of these we papered over with
PMS and EAPI to make
the actual API people use less horrific. Lets not preach from our ivory
> > It seems reasonable to me to 'hook' portage into these other package
> > managers, so that running 'emerge bar' would actually run 'cabal install
> > bar'
> Can "cabal install" build or even identify the C libraries that your
> Haskell package needs? No, because nobody ever thought of that, and it
> seems kind of hard now that the cabal build system has no ability to
> build non-Haskell packages, so no one is ever going to work on it.
> Can "cabal install" rebuild your Haskell packages when the ABI of some
> library changes? No, because "cabal install" doesn't have any idea
> what's installed on your system.
> Can "cabal install" uninstall a package? Nope, it has no idea what was
> done during the installation, and thus no idea what to undo.
> Can "cabal install" verify the integrity of your downloaded source code?
> No, because by design it fetches and runs code from complete strangers.
> Can "cabal install" use a local tarball to function without network
> access? Etc. We're dead in the water.
> Every other language-specific package manager has the same problems,
> because they're all written by people who didn't know anything about
> package management and then got bored when they realized that there's
> more to it than parsing a json file of dependencies.
They are written by people who are not you, who have different problems
than you and often don't care about the above use cases.
It turns out this stuff exists because:
1) Upstream wants to push 1 single thing and have it work in all distros.
2) pip / virtualenv / cargo / whatever work reasonable well.
3) Rolling-based distros couldn't keep up with packaging.
4) Snapshot-based distros (debian stable / ubuntu) were not designed with
this in mind as much; because packages were developed with a high velocity.
> If you want to eliminate the duplication of effort, tell these people to
> use Gentoo Prefix instead of writing the N+1st crippled PM. Doing it the
> other way around won't work because we'd be replacing one good thing
> with 75 shitty things.
I agree that in theory they could have published ebuilds for Gentoo prefix
and it would have 'worked everywhere' but I think that boat sailed about 10
https://wiki.gentoo.org/wiki/Project:Perl/g-cpan is a project is in a
similar space and basically reads perl CPAN metadata to generate stub
Portage tracks these stub ebuilds (and so for example, it tracks what these
cpan packages install and can remove them afterwards.)
I think this is the most pragmatic approach I've seen used as its mostly an
adapter (to cpan) that just generates ebuilds.
Its plausible that with some careful eclass magic you might be able to make
the installed packages compatible with pip, cargo, etc.
I think its more of a struggle to make it compatible with things like
virtualenv or pip --user though.